-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
49 lines (48 loc) · 1.14 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
40
41
42
43
44
45
46
47
48
49
// @ts-check
const config = require('@quitsmx/eslint-config')
/**
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
extends: ['@quitsmx'],
ignorePatterns: ['/dist', '/patches'],
env: {
node: true,
},
globals: {
vim: 'readonly',
print: 'readonly',
},
overrides: [
{
parserOptions: {
project: './tsconfig.json',
ecmaFeatures: {
classStaticBlock: true,
},
},
files: ['*.ts', '*.tsx'],
extends: ['@quitsmx/eslint-config/ts-runtime'],
},
{
files: ['./*.js', 'scripts/**/*.js'],
parserOptions: { sourceType: 'script' },
extends: ['@quitsmx/eslint-config/node'],
rules: {
'node/no-unsupported-features/es-syntax': ['error', { ignores: ['modules'] }],
},
},
{
parserOptions: { project: './packages/**/tsconfig.json' },
files: ['rollup.config.js', 'packages/**/*.ts'],
extends: ['@quitsmx/eslint-config/ts-runtime'],
},
],
rules: {
'no-void': 'off',
'no-restricted-globals': config.rules['no-restricted-globals'].filter(
(it) => !['print'].includes(it)
),
},
}