-
Notifications
You must be signed in to change notification settings - Fork 62
/
eslint.config.mjs
57 lines (53 loc) · 1.89 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
import pluginJs from '@eslint/js';
import configPrettier from 'eslint-config-prettier';
import pluginTypescript from 'typescript-eslint';
for (const config of pluginTypescript.configs.recommendedTypeChecked) {
config.files = ['**/*.{ts,tsx,mts,cts}']; // ensure config only targets TypeScript files
}
/** @type {import('eslint').Linter.Config[]} */
export default [
{
ignores: [
'**/dist/',
'**/esm/',
'packages/create-stylable-app/typings/template.d.ts',
'packages/language-service/test/fixtures/server-cases/mixins/',
'packages/runtime/stylesheet.d.ts',
'packages/webpack-plugin/test/e2e/projects/',
'.temp/'
],
},
pluginJs.configs.recommended,
{
rules: {
'no-console': 'off',
'no-undef': 'off',
'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
},
},
...pluginTypescript.configs.recommendedTypeChecked,
{ languageOptions: { parserOptions: { projectService: true } } },
{
files: ['**/*.{ts,tsx,mts,cts}'],
rules: {
'@typescript-eslint/no-base-to-string': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-unsafe-return': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
'@typescript-eslint/restrict-plus-operands': 'off',
'@typescript-eslint/restrict-template-expressions': 'off',
'@typescript-eslint/unbound-method': 'off',
},
},
configPrettier,
];