forked from gajus/eslint-plugin-jsdoc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheslint.config.js
More file actions
118 lines (114 loc) · 2.52 KB
/
Copy patheslint.config.js
File metadata and controls
118 lines (114 loc) · 2.52 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
import {
jsdoc,
} from './src/index.js';
import {
recommended as canonical,
} from 'eslint-config-canonical/canonical';
// import {
// recommended as canonicalJsdoc,
// } from 'eslint-config-canonical/jsdoc';
import globals from 'globals';
const common = {
linterOptions: {
reportUnusedDisableDirectives: 'error',
reportUnusedInlineConfigs: 'error',
},
};
export default [
{
ignores: [
'coverage',
'dist',
],
},
...canonical,
// ...canonicalJsdoc,
jsdoc({
config: 'flat/recommended',
}),
...jsdoc({
config: 'examples-and-default-expressions',
}),
{
// Must be by itself
ignores: [
'dist/**', '.ignore/**', '**/*.d.ts',
],
},
{
...common,
languageOptions: {
ecmaVersion: 'latest',
globals: globals.node,
sourceType: 'module',
},
rules: {
'@stylistic/array-element-newline': 0,
'@stylistic/no-extra-parens': 0,
'canonical/filename-match-exported': 0,
'canonical/filename-match-regex': 0,
// Temporarily disable until supports ESLint 10
'eslint-comments/disable-enable-pair': 0,
'eslint-comments/no-aggregating-enable': 0,
'eslint-comments/no-duplicate-disable': 0,
'eslint-comments/no-unlimited-disable': 0,
'filenames/match-regex': 0,
'import/extensions': 0,
'import/no-useless-path-segments': 0,
'jsdoc/require-param-description': 0,
'jsdoc/require-returns': 0,
'jsdoc/require-returns-description': 0,
'linebreak-style': 0,
'no-inline-comments': 0,
'prefer-named-capture-group': 0,
'require-unicode-regexp': [
'error',
{
requireFlag: 'v',
},
],
'unicorn/import-index': 0,
'unicorn/no-array-reduce': 0,
'unicorn/no-unsafe-regex': 0,
'unicorn/prefer-array-some': 0,
'unicorn/prevent-abbreviations': 0,
},
},
{
...common,
files: [
'.ncurc.cjs',
],
languageOptions: {
parserOptions: {
ecmaFeatures: {
impliedStrict: false,
},
},
sourceType: 'script',
},
rules: {
'canonical/filename-match-regex': 0,
'import/no-commonjs': 0,
strict: [
'error',
'global',
],
},
},
{
...common,
files: [
'test/**/*.js',
],
languageOptions: {
ecmaVersion: 'latest',
globals: globals.mocha,
sourceType: 'module',
},
rules: {
'no-restricted-syntax': 0,
'unicorn/prevent-abbreviations': 0,
},
},
];