ampcast/.eslintrc.js

55 lines
1.5 KiB
JavaScript
Raw Normal View History

2021-07-20 09:29:42 +08:00
module.exports = {
2023-02-15 05:58:41 +08:00
env: {
browser: true,
es2021: true,
node: true,
2021-07-20 09:29:42 +08:00
},
2023-02-15 05:58:41 +08:00
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
2021-07-20 09:29:42 +08:00
],
2023-02-15 05:58:41 +08:00
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaFeatures: {
jsx: true,
2021-07-20 09:29:42 +08:00
},
2023-02-15 05:58:41 +08:00
ecmaVersion: 12,
sourceType: 'module',
2021-07-20 09:29:42 +08:00
},
2023-02-15 05:58:41 +08:00
plugins: ['react', '@typescript-eslint', 'react-hooks'],
rules: {
curly: 'error',
2021-07-20 09:29:42 +08:00
'guard-for-in': 'error',
'no-unused-labels': 'error',
'no-duplicate-case': 'error',
'no-bitwise': 'error',
'no-debugger': 'error',
'no-console': ['error', {allow: ['info', 'log', 'warn', 'error']}],
'no-new-wrappers': 'error',
'no-redeclare': 'error',
'no-empty': 'error',
'no-eval': 'error',
'no-throw-literal': 'error',
'no-fallthrough': 'error',
'no-template-curly-in-string': 'error',
2023-02-15 05:58:41 +08:00
radix: 'error',
eqeqeq: ['error', 'smart'],
2021-07-20 09:29:42 +08:00
'no-caller': 'error',
'no-alert': 'error',
2023-02-15 05:58:41 +08:00
'react/no-unknown-property': ['error', {ignore: ['onClose']}],
2021-07-20 09:29:42 +08:00
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
2023-02-15 05:58:41 +08:00
'react/prop-types': 'off',
2021-07-20 09:29:42 +08:00
'no-redeclare': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-explicit-any': 'off',
},
2023-02-15 05:58:41 +08:00
settings: {
react: {
version: 'detect',
},
},
2021-07-20 09:29:42 +08:00
};