Enable lint command

Signed-off-by: Francesco Torchia <francesco.torchia@suse.com>
This commit is contained in:
Francesco Torchia
2024-11-12 11:50:19 +01:00
parent eaa8fd7d92
commit 19b11aac2c
5 changed files with 453 additions and 204 deletions
+195 -198
View File
@@ -1,247 +1,244 @@
module.exports = {
"root": true,
"env": {
"browser": true,
"node": true
root: true,
env: {
browser: true,
node: true
},
"globals": {
"NodeJS": true,
"Timer": true
globals: {
NodeJS: true,
Timer: true
},
"extends": [
"standard",
"eslint:recommended",
"@nuxtjs/eslint-config-typescript",
"plugin:cypress/recommended"
extends: [
'.eslintrc.default.js'
],
"rules": {
"dot-notation": "off",
"generator-star-spacing": "off",
"guard-for-in": "off",
"linebreak-style": "off",
"new-cap": "off",
"no-empty": "off",
"no-extra-boolean-cast": "off",
"no-new": "off",
"no-plusplus": "off",
"no-useless-escape": "off",
"nuxt/no-cjs-in-config": "off",
"semi-spacing": "off",
"space-in-parens": "off",
"strict": "off",
"unicorn/no-new-buffer": "off",
"vue/html-self-closing": "off",
"vue/multi-word-component-names": "off",
"vue/no-reserved-component-names": "off",
"vue/no-unused-components": "warn",
"vue/no-v-html": "error",
"wrap-iife": "off",
"array-bracket-spacing": "warn",
"arrow-parens": "warn",
"arrow-spacing": [
"warn",
rules: {
'dot-notation': 'off',
'generator-star-spacing': 'off',
'guard-for-in': 'off',
'linebreak-style': 'off',
'new-cap': 'off',
'no-empty': 'off',
'no-extra-boolean-cast': 'off',
'no-new': 'off',
'no-plusplus': 'off',
'no-useless-escape': 'off',
'nuxt/no-cjs-in-config': 'off',
'semi-spacing': 'off',
'space-in-parens': 'off',
strict: 'off',
'unicorn/no-new-buffer': 'off',
'vue/html-self-closing': 'off',
'vue/multi-word-component-names': 'off',
'vue/no-reserved-component-names': 'off',
'vue/no-deprecated-v-on-native-modifier': 'off',
'vue/no-useless-template-attributes': 'off',
'vue/no-unused-components': 'warn',
'vue/no-v-html': 'error',
'wrap-iife': 'off',
'array-bracket-spacing': 'warn',
'arrow-parens': 'warn',
'arrow-spacing': [
'warn',
{
"before": true,
"after": true
before: true,
after: true
}
],
"block-spacing": [
"warn",
"always"
'block-spacing': [
'warn',
'always'
],
"brace-style": [
"warn",
"1tbs"
'brace-style': [
'warn',
'1tbs'
],
"comma-dangle": [
"warn",
"only-multiline"
'comma-dangle': [
'warn',
'only-multiline'
],
"comma-spacing": "warn",
"curly": "warn",
"eqeqeq": "warn",
"func-call-spacing": [
"warn",
"never"
'comma-spacing': 'warn',
curly: 'warn',
eqeqeq: 'warn',
'func-call-spacing': [
'warn',
'never'
],
"implicit-arrow-linebreak": "warn",
"indent": [
"warn",
'implicit-arrow-linebreak': 'warn',
indent: [
'warn',
2
],
"keyword-spacing": "warn",
"lines-between-class-members": [
"warn",
"always",
'keyword-spacing': 'warn',
'lines-between-class-members': [
'warn',
'always',
{ exceptAfterSingleLine: true }
],
'multiline-ternary': [
'warn',
'never'
],
'newline-per-chained-call': [
'warn',
{ ignoreChainWithDepth: 4 }
],
'no-caller': 'warn',
'no-cond-assign': [
'warn',
'except-parens'
],
'no-console': 'warn',
'no-debugger': 'warn',
'no-eq-null': 'warn',
'no-eval': 'warn',
'no-trailing-spaces': 'warn',
'no-undef': 'warn',
'no-unused-vars': 'warn',
'no-whitespace-before-property': 'warn',
'object-curly-spacing': [
'warn',
'always'
],
'object-property-newline': 'warn',
'object-shorthand': 'warn',
'padded-blocks': [
'warn',
'never'
],
'prefer-arrow-callback': 'warn',
'prefer-template': 'warn',
'quote-props': 'warn',
'rest-spread-spacing': 'warn',
semi: [
'warn',
'always'
],
'space-before-function-paren': [
'warn',
'never'
],
'space-infix-ops': 'warn',
'spaced-comment': 'warn',
'switch-colon-spacing': 'warn',
'template-curly-spacing': [
'warn',
'always'
],
'yield-star-spacing': [
'warn',
'both'
],
'key-spacing': [
'warn',
{
"exceptAfterSingleLine": true
}
],
"multiline-ternary": [
"warn",
"never"
],
"newline-per-chained-call": [
"warn",
{
"ignoreChainWithDepth": 4
}
],
"no-caller": "warn",
"no-cond-assign": [
"warn",
"except-parens"
],
"no-console": "warn",
"no-debugger": "warn",
"no-eq-null": "warn",
"no-eval": "warn",
"no-trailing-spaces": "warn",
"no-undef": "warn",
"no-unused-vars": "warn",
"no-whitespace-before-property": "warn",
"object-curly-spacing": [
"warn",
"always"
],
"object-property-newline": "warn",
"object-shorthand": "warn",
"padded-blocks": [
"warn",
"never"
],
"prefer-arrow-callback": "warn",
"prefer-template": "warn",
"quote-props": "warn",
"rest-spread-spacing": "warn",
"semi": [
"warn",
"always"
],
"space-before-function-paren": [
"warn",
"never"
],
"space-infix-ops": "warn",
"spaced-comment": "warn",
"switch-colon-spacing": "warn",
"template-curly-spacing": [
"warn",
"always"
],
"yield-star-spacing": [
"warn",
"both"
],
"key-spacing": [
"warn",
{
"align": {
"beforeColon": false,
"afterColon": true,
"on": "value",
"mode": "minimum"
align: {
beforeColon: false,
afterColon: true,
on: 'value',
mode: 'minimum'
},
"multiLine": {
"beforeColon": false,
"afterColon": true
multiLine: {
beforeColon: false,
afterColon: true
}
}
],
"object-curly-newline": [
"warn",
'object-curly-newline': [
'warn',
{
"ObjectExpression": {
"multiline": true,
"minProperties": 3
ObjectExpression: {
multiline: true,
minProperties: 3
},
"ObjectPattern": {
"multiline": true,
"minProperties": 4
ObjectPattern: {
multiline: true,
minProperties: 4
},
"ImportDeclaration": {
"multiline": true,
"minProperties": 5
ImportDeclaration: {
multiline: true,
minProperties: 5
},
"ExportDeclaration": {
"multiline": true,
"minProperties": 3
ExportDeclaration: {
multiline: true,
minProperties: 3
}
}
],
"padding-line-between-statements": [
"warn",
'padding-line-between-statements': [
'warn',
{
"blankLine": "always",
"prev": "*",
"next": "return"
blankLine: 'always',
prev: '*',
next: 'return'
},
{
"blankLine": "always",
"prev": "function",
"next": "function"
blankLine: 'always',
prev: 'function',
next: 'function'
},
{
"blankLine": "always",
"prev": [
"const",
"let",
"var"
blankLine: 'always',
prev: [
'const',
'let',
'var'
],
"next": "*"
next: '*'
},
{
"blankLine": "any",
"prev": [
"const",
"let",
"var"
blankLine: 'any',
prev: [
'const',
'let',
'var'
],
"next": [
"const",
"let",
"var"
next: [
'const',
'let',
'var'
]
}
],
"quotes": [
"warn",
"single",
quotes: [
'warn',
'single',
{
"avoidEscape": true,
"allowTemplateLiterals": true
avoidEscape: true,
allowTemplateLiterals: true
}
],
"space-unary-ops": [
"warn",
'space-unary-ops': [
'warn',
{
"words": true,
"nonwords": false
words: true,
nonwords: false
}
],
"vue/order-in-components": "off",
"vue/no-lone-template": "off",
"vue/v-slot-style": "off",
"vue/component-tags-order": "off",
"vue/no-mutating-props": "off",
"@typescript-eslint/no-unused-vars": "off",
"array-callback-return": "off",
"vue/one-component-per-file": "off",
"vue/no-deprecated-slot-attribute": "off",
"vue/require-explicit-emits": "off",
"vue/v-on-event-hyphenation": "off"
'vue/order-in-components': 'off',
'vue/no-lone-template': 'off',
'vue/v-slot-style': 'off',
'vue/component-tags-order': 'off',
'vue/no-mutating-props': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-this-alias': 'off',
'array-callback-return': 'off',
'vue/one-component-per-file': 'off',
'vue/no-deprecated-slot-attribute': 'off',
'vue/require-explicit-emits': 'off',
'vue/v-on-event-hyphenation': 'off'
},
"overrides": [
overrides: [
{
"files": [
"*.js"
files: [
'*.js'
],
"rules": {
"prefer-regex-literals": "off",
"vue/component-definition-name-casing": "off",
"no-unreachable-loop": "off",
"computed-property-spacing": "off"
rules: {
'prefer-regex-literals': 'off',
'vue/component-definition-name-casing': 'off',
'no-unreachable-loop': 'off',
'computed-property-spacing': 'off'
}
}
]
}
};