-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy patheslint.config.mjs
51 lines (50 loc) · 1.32 KB
/
eslint.config.mjs
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
40
41
42
43
44
45
46
47
48
49
50
51
import importPlugin from 'eslint-plugin-import'
import prettierPlugin from 'eslint-plugin-prettier'
import tsConfig from './eslintrc/ts.mjs'
import cjsConfig from './eslintrc/cjs.mjs'
import esmConfig from './eslintrc/esm.mjs'
export default [
{
ignores: ['.next/**/*', '.husky/**/*', 'coverage/**/*', 'node_modules'],
},
{
languageOptions: {
globals: {
process: 'readonly',
module: 'readonly',
require: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
exports: 'readonly',
},
},
plugins: {
'eslint-plugin-import': importPlugin,
'eslint-plugin-prettier': prettierPlugin,
},
rules: {
'max-len': [
'error',
{
code: 180,
tabWidth: 2,
ignoreTemplateLiterals: true,
ignoreUrls: true,
ignoreStrings: true,
},
],
semi: ['error', 'never'],
'no-console': 'warn',
'eslint-plugin-import/no-duplicates': 'warn',
'eslint-plugin-import/no-extraneous-dependencies': [
'warn',
{
devDependencies: ['**/*.spec.ts', '**/*/jest.config.*.ts', 'eslintrc/**/*.mjs', 'scripts/**/*.mjs', 'jest/**/*.ts', '.cz-config.js', '**/eslint.config.mjs'],
},
],
},
},
...tsConfig,
...cjsConfig,
...esmConfig,
]