-
Notifications
You must be signed in to change notification settings - Fork 62
/
Copy patheslint.config.mjs
59 lines (58 loc) · 1.54 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
52
53
54
55
56
57
58
59
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettierPlugin from 'eslint-plugin-prettier';
export default [
{
ignores: ['**/dist/**', '**/node_modules/**', '**/turbo/**'],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ['**/*.{js,jsx,cjs,mjs,ts,tsx,cts,mts}'],
ignores: [
'node_modules/',
'dist/',
'build/',
'.turbo',
'/doc/.dumi',
'public',
],
plugins: {
'@typescript-eslint': tseslint.plugin,
prettier: prettierPlugin,
},
rules: {
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/no-this-alias': 'off',
'@typescript-eslint/consistent-type-imports': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'prettier/prettier': 'error',
'no-case-declarations': 'off',
},
},
{
files: ['**/rollup.config.js'],
languageOptions: {
globals: {
console: 'readonly',
process: 'readonly',
__dirname: 'readonly',
__filename: 'readonly',
module: 'readonly',
require: 'readonly',
Buffer: 'readonly',
global: 'readonly',
setImmediate: 'readonly',
clearImmediate: 'readonly',
},
},
rules: {
'@typescript-eslint/no-var-requires': 'off',
'no-console': 'off',
},
},
];