|
module.exports = { |
|
root: true, |
|
env: { |
|
browser: true, |
|
node: true, |
|
es2020: true, |
|
}, |
|
parserOptions: { |
|
ecmaVersion: 2020, |
|
}, |
|
extends: [ |
|
"eslint:recommended", |
|
"plugin:import/recommended", |
|
"plugin:@typescript-eslint/recommended", |
|
"plugin:import/typescript", |
|
"prettier", |
|
], |
|
plugins: ["import", "@typescript-eslint", "prettier"], |
|
settings: { |
|
|
|
"import/resolver": { |
|
|
|
node: {}, |
|
}, |
|
}, |
|
ignorePatterns: [ |
|
|
|
"node_modules/", |
|
"public/", |
|
|
|
|
|
"!.*.js", |
|
"!.*.ts", |
|
], |
|
rules: { |
|
|
|
indent: "off", |
|
quotes: ["error", "double"], |
|
camelcase: ["error", { properties: "always" }], |
|
"linebreak-style": ["error", "unix"], |
|
"eol-last": ["error", "always"], |
|
"max-len": ["error", { code: 200, tabWidth: 4, ignorePattern: `d="([\\s\\S]*?)"` }], |
|
"prefer-destructuring": "off", |
|
"no-console": "warn", |
|
"no-debugger": "warn", |
|
"no-param-reassign": ["error", { props: false }], |
|
"no-bitwise": "off", |
|
"no-shadow": "off", |
|
"no-use-before-define": "off", |
|
"no-restricted-imports": ["error", { patterns: [".*", "!@graphite/*"] }], |
|
|
|
|
|
"import/prefer-default-export": "off", |
|
"import/no-relative-packages": "error", |
|
"import/order": [ |
|
"error", |
|
{ |
|
alphabetize: { |
|
order: "asc", |
|
caseInsensitive: true, |
|
}, |
|
warnOnUnassignedImports: true, |
|
"newlines-between": "always-and-inside-groups", |
|
pathGroups: [], |
|
}, |
|
], |
|
|
|
|
|
"prettier/prettier": [ |
|
"error", |
|
{ |
|
tabWidth: 4, |
|
tabs: true, |
|
printWidth: 200, |
|
}, |
|
], |
|
}, |
|
overrides: [ |
|
{ |
|
files: ["*.js"], |
|
rules: { |
|
"@typescript-eslint/explicit-function-return-type": ["off"], |
|
}, |
|
}, |
|
], |
|
}; |
|
|