lint(ags): switch config to json and add no-dupe rule

This commit is contained in:
matt1432 2023-11-03 22:58:33 -04:00
parent 25f9220beb
commit 3cb8bcb3e9
2 changed files with 42 additions and 76 deletions

View file

@ -0,0 +1,42 @@
{
"env": {
"es2021": true
},
"extends": "eslint:recommended",
"overrides": [],
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"arrow-parens": ["error", "as-needed"],
"comma-dangle": ["error", "always-multiline"],
"comma-spacing": ["error", { "before": false, "after": true }],
"comma-style": ["error", "last"],
"curly": ["error", "multi-or-nest", "consistent"],
"dot-location": ["error", "property"],
"eol-last": 0,
"indent": ["error", 4, { "SwitchCase": 1 }],
"keyword-spacing": ["error", { "before": true }],
"lines-between-class-members": ["error", "always", { "exceptAfterSingleLine": true }],
"padded-blocks": ["error", "never", { "allowSingleLineBlocks": false }],
"prefer-const": "error",
"quotes": ["error", "single", { "avoidEscape": true }],
"semi": ["error", "always"],
"nonblock-statement-body-position": ["error", "below"],
"no-trailing-spaces": ["error"],
"no-dupe-class-members": 0,
"array-bracket-spacing": ["error", "never"],
"key-spacing": ["error", { "beforeColon": false, "afterColon": true }],
"object-curly-spacing": ["error", "always"],
"no-useless-escape": ["off"]
},
"globals": {
"ags": "readonly",
"ARGV": "readonly",
"imports": "readonly",
"print": "readonly",
"console": "readonly",
"logError": "readonly"
}
}

View file

@ -1,76 +0,0 @@
env:
es2021: true
extends: eslint:recommended
overrides: []
parserOptions:
ecmaVersion: latest
sourceType: 'module'
rules:
arrow-parens:
- error
- as-needed
comma-dangle:
- error
- always-multiline
comma-spacing:
- error
- before: false
after: true
comma-style:
- error
- last
curly:
- error
- multi-or-nest
- consistent
dot-location:
- error
- property
eol-last: error
indent:
- error
- 4
- SwitchCase: 1
keyword-spacing:
- error
- before: true
lines-between-class-members:
- error
- always
- exceptAfterSingleLine: true
padded-blocks:
- error
- never
- allowSingleLineBlocks: false
prefer-const: error
quotes:
- error
- single
- avoidEscape: true
semi:
- error
- always
nonblock-statement-body-position:
- error
- below
no-trailing-spaces:
- error
array-bracket-spacing:
- error
- never
key-spacing:
- error
- beforeColon: false
afterColon: true
object-curly-spacing:
- error
- always
no-useless-escape:
- off
globals:
ags: readonly
ARGV: readonly
imports: readonly
print: readonly
console: readonly
logError: readonly