-
Notifications
You must be signed in to change notification settings - Fork 11
/
.eslintrc.cjs
39 lines (38 loc) · 1.34 KB
/
.eslintrc.cjs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
const { include: devFiles } = require('./tsconfig.dev.json');
/** @type {import('eslint').Linter.Config} */
module.exports = {
parser: '@typescript-eslint/parser',
parserOptions: { project: ['tsconfig.json', 'tsconfig.dev.json'] },
settings: { react: { version: 'detect' }, 'import/resolver': 'typescript' },
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:react/recommended',
'plugin:prettier/recommended',
'plugin:react-hooks/recommended',
'plugin:eslint-comments/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@next/next/recommended',
],
ignorePatterns: ['types/abi.ts'],
rules: {
eqeqeq: ['error', 'always', { null: 'ignore' }],
'no-console': 'error',
'@typescript-eslint/no-shadow': 'error',
'eslint-comments/no-unused-disable': 'error',
'@typescript-eslint/no-unused-vars': ['error', { ignoreRestSiblings: true }],
},
overrides: [
{
files: devFiles,
extends: ['plugin:node/recommended'],
rules: {
'node/no-missing-import': ['error', { tryExtensions: ['.ts', '.js', '.json'] }],
'node/no-unpublished-import': 'off',
'@typescript-eslint/no-var-requires': 'off',
'node/no-unsupported-features/es-syntax': ['error', { ignores: ['modules', 'dynamicImport'] }],
},
},
],
};