add-prettier: Add prettier error in eslint

pull/448/head
maskeynihal 2023-10-12 11:44:09 +05:45
parent 86069a6e1e
commit 21d7b7b43e
6 changed files with 1053 additions and 60 deletions

View File

@ -1,42 +1,44 @@
module.exports = {
env: {
'browser': true,
'node': true,
},
extends: [
'eslint:recommended',
'plugin:vue/recommended',
'prettier',
],
parserOptions: {
parser: '@babel/eslint-parser',
ecmaVersion: 2018,
sourceType: 'module',
requireConfigFile: false,
},
rules: {
'linebreak-style': ['error', 'unix'],
semi: ['error', 'always'],
'comma-dangle': ['error', 'always-multiline'],
'vue/require-v-for-key': 0,
'vue/require-default-prop': 0,
'vue/no-v-html': 0,
'vue/max-attributes-per-line': 0,
'vue/html-indent': ['error', 4],
'vue/script-indent': ['error', 4, {
baseIndent: 1,
switchCase: 1,
}],
'vue/no-unused-vars': 0,
'vue/html-self-closing': 0,
'vue/multi-word-component-names': 0,
'vue/no-reserved-component-names': 0,
'eol-last': ['error', 'always'],
},
globals: {
'describe': true,
'expect': true,
'it': true,
'test': true,
},
env: {
browser: true,
node: true,
},
extends: ['eslint:recommended', 'plugin:vue/recommended', 'prettier'],
parserOptions: {
parser: '@babel/eslint-parser',
ecmaVersion: 2018,
sourceType: 'module',
requireConfigFile: false,
},
rules: {
'linebreak-style': ['error', 'unix'],
semi: ['error', 'always'],
'comma-dangle': ['error', 'always-multiline'],
'vue/require-v-for-key': 0,
'vue/require-default-prop': 0,
'vue/no-v-html': 0,
'vue/max-attributes-per-line': 0,
'vue/html-indent': ['error', 4],
'vue/script-indent': [
'error',
4,
{
baseIndent: 1,
switchCase: 1,
},
],
'vue/no-unused-vars': 'warn',
'vue/html-self-closing': 0,
'vue/multi-word-component-names': 0,
'vue/no-reserved-component-names': 0,
'eol-last': ['error', 'always'],
'prettier/prettier': 'error',
},
globals: {
describe: true,
expect: true,
it: true,
test: true,
},
plugins: ['prettier'],
};

2
.prettierignore Normal file
View File

@ -0,0 +1,2 @@
package.json
package-lock.json

View File

@ -1,9 +1,9 @@
{
"singleQuote": true,
"trailingComma": "all",
"vueIndentScriptAndStyle": true,
"htmlWhitespaceSensitivity": "ignore",
"printWidth": 100,
"tabWidth": 4,
"singleAttributePerLine": true
"singleQuote": true,
"trailingComma": "all",
"vueIndentScriptAndStyle": true,
"htmlWhitespaceSensitivity": "ignore",
"printWidth": 100,
"tabWidth": 4,
"singleAttributePerLine": true
}

999
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -24,7 +24,8 @@
"test:stylelint": "stylelint 'src/**/*.scss' --config node_modules/do-bulma/.stylelintrc.json",
"test:i18n-packs": "node --es-module-specifier-resolution=node src/nginxconfig/i18n/verify.js",
"prepare": "husky install",
"prettier": "prettier --write 'src/**/*.{js,vue}'"
"prettier": "prettier --write 'src/**/*.{js,vue}'",
"prettier:check": "prettier 'src/**/*.{js,vue}' --check"
},
"jest": {
"testRegex": "/test/.*.js?$"
@ -73,6 +74,7 @@
"duplicate-package-checker-webpack-plugin": "^3.0.0",
"eslint": "^8.46.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-vue": "^9.16.1",
"esm": "^3.2.25",
"husky": "^8.0.3",

View File

@ -64,12 +64,12 @@ THE SOFTWARE.
return this.$data.scrolled && !this.$data.closed;
},
style() {
return this.visible
? undefined
: {
opacity: 0,
pointerEvents: 'none',
};
const nonVisibleStyle = {
opacity: 0,
pointerEvents: 'none',
};
return this.visible ? undefined : nonVisibleStyle;
},
},
mounted() {