hookshot/.eslintrc.js

64 lines
1.9 KiB
JavaScript
Raw Permalink Normal View History

2020-11-22 21:10:10 +00:00
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint'
2020-11-22 21:10:10 +00:00
],
extends: [
'eslint:recommended',
2024-04-16 22:14:26 +01:00
'plugin:mocha/recommended',
2020-11-22 21:10:10 +00:00
'plugin:@typescript-eslint/recommended',
],
// eslint-config-preact needs a Jest version to be happy, even if Jest isn't used.
// See https://github.com/preactjs/eslint-config-preact/issues/19#issuecomment-997924892
settings: {
jest: { "version": 27 },
},
2020-11-22 21:10:10 +00:00
rules: {
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": "warn",
2020-11-22 21:10:10 +00:00
"camelcase": ["error", { "properties": "never", "ignoreDestructuring": true }],
2024-04-16 22:14:26 +01:00
"no-console": "error",
"mocha/no-exclusive-tests": "error",
// We do this everywhere.
"mocha/no-mocha-arrows": "off",
2020-11-22 21:10:10 +00:00
},
env: {
node: true,
es6: true,
2020-11-22 21:10:10 +00:00
},
overrides: [
{
files: ["test/**/*.ts"],
parser: '@typescript-eslint/parser',
plugins: [
'@typescript-eslint',
'mocha',
],
},
{
files: ["web/**/*.ts", "web/**/*.tsx"],
parser: '@typescript-eslint/parser',
env: {
browser: true,
node: false,
},
extends: [
'plugin:@typescript-eslint/recommended',
'preact',
],
plugins: [
'@typescript-eslint',
],
rules: {
"no-console": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-unused-vars": ["error"],
"no-useless-constructor": "off",
"@typescript-eslint/no-useless-constructor": ["error"],
},
}
]
2020-11-22 21:10:10 +00:00
};