@cto.af/eslint-config 6.0.7 → 6.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/js.js +33 -22
- package/markdown.js +2 -0
- package/package.json +1 -1
- package/rules/markdown.js +21 -0
- package/ts.js +2 -5
package/js.js
CHANGED
|
@@ -4,27 +4,38 @@ import redos from 'eslint-plugin-redos';
|
|
|
4
4
|
import {rules} from './rules/js.js';
|
|
5
5
|
import stylistic from '@stylistic/eslint-plugin';
|
|
6
6
|
|
|
7
|
-
export default [
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
7
|
+
export default [
|
|
8
|
+
{
|
|
9
|
+
files: [
|
|
10
|
+
'**/*.js',
|
|
11
|
+
'**/*.cjs',
|
|
12
|
+
'**/*.mjs',
|
|
13
|
+
'**/*.ts',
|
|
14
|
+
],
|
|
15
|
+
plugins: {
|
|
16
|
+
'@stylistic': stylistic,
|
|
17
|
+
n,
|
|
18
|
+
redos,
|
|
19
|
+
},
|
|
20
|
+
languageOptions: {
|
|
21
|
+
ecmaVersion: 2022,
|
|
22
|
+
globals: globals.node,
|
|
23
|
+
sourceType: 'commonjs',
|
|
24
|
+
},
|
|
25
|
+
linterOptions: {
|
|
26
|
+
noInlineConfig: false,
|
|
27
|
+
reportUnusedDisableDirectives: 'error',
|
|
28
|
+
reportUnusedInlineConfigs: 'error',
|
|
29
|
+
},
|
|
30
|
+
rules,
|
|
18
31
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
32
|
+
{
|
|
33
|
+
files: [
|
|
34
|
+
'**/bin/*.js',
|
|
35
|
+
],
|
|
36
|
+
rules: {
|
|
37
|
+
'no-console': 'off',
|
|
38
|
+
'n/no-top-level-await': 'off',
|
|
39
|
+
},
|
|
23
40
|
},
|
|
24
|
-
|
|
25
|
-
noInlineConfig: false,
|
|
26
|
-
reportUnusedDisableDirectives: 'error',
|
|
27
|
-
reportUnusedInlineConfigs: 'error',
|
|
28
|
-
},
|
|
29
|
-
rules,
|
|
30
|
-
}];
|
|
41
|
+
];
|
package/markdown.js
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const rules = {
|
|
2
|
+
// Check: markdown
|
|
3
|
+
// [Rules](https://github.com/eslint/markdown?tab=readme-ov-file#rules)
|
|
4
|
+
'markdown/fenced-code-language': 'error',
|
|
5
|
+
'markdown/heading-increment': 'error',
|
|
6
|
+
'markdown/no-bare-urls': 'error',
|
|
7
|
+
'markdown/no-duplicate-definitions': 'error',
|
|
8
|
+
'markdown/no-duplicate-headings': 'error',
|
|
9
|
+
'markdown/no-empty-definitions': 'error',
|
|
10
|
+
'markdown/no-empty-images': 'error',
|
|
11
|
+
'markdown/no-empty-links': 'error',
|
|
12
|
+
'markdown/no-html': 'off', // Used frequently
|
|
13
|
+
'markdown/no-invalid-label-refs': 'error',
|
|
14
|
+
'markdown/no-missing-atx-heading-space': 'error',
|
|
15
|
+
'markdown/no-missing-label-refs': 'error',
|
|
16
|
+
'markdown/no-missing-link-fragments': 'error',
|
|
17
|
+
'markdown/no-multiple-h1': 'error',
|
|
18
|
+
'markdown/no-reversed-media-syntax': 'error',
|
|
19
|
+
'markdown/require-alt-text': 'warn',
|
|
20
|
+
'markdown/table-column-count': 'error',
|
|
21
|
+
};
|
package/ts.js
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
|
+
import ignores from './ignores.js';
|
|
1
2
|
import {rules} from './rules/ts.js';
|
|
2
3
|
import tslint from 'typescript-eslint';
|
|
3
4
|
|
|
4
5
|
const blob = {
|
|
5
6
|
files: ['**/*.ts'],
|
|
6
|
-
ignores: [
|
|
7
|
-
'coverage/**',
|
|
8
|
-
'node_modules/**',
|
|
9
|
-
'docs/**',
|
|
10
|
-
],
|
|
7
|
+
ignores: ignores[0].ignores,
|
|
11
8
|
settings: {
|
|
12
9
|
n: {
|
|
13
10
|
// Ensure that importing real .js files works
|