-
Notifications
You must be signed in to change notification settings - Fork 105
Expand file tree
/
Copy patheslint.config.js
More file actions
131 lines (113 loc) · 2.67 KB
/
Copy patheslint.config.js
File metadata and controls
131 lines (113 loc) · 2.67 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
119
120
121
122
123
124
125
126
127
128
129
130
131
/**
* @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
*/
import globals from 'globals';
import { defineConfig } from 'eslint/config';
import ckeditor5Rules from 'eslint-plugin-ckeditor5-rules';
import ckeditor5Config from 'eslint-config-ckeditor5';
import pluginReact from 'eslint-plugin-react';
import ts from 'typescript-eslint';
export default defineConfig( [
{
ignores: [
'coverage/**',
'dist/**',
'release/**',
'**/*.d.ts'
]
},
{
extends: [
ckeditor5Config,
pluginReact.configs.flat.recommended
],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
globals: {
...globals.browser
}
},
linterOptions: {
reportUnusedDisableDirectives: 'warn',
reportUnusedInlineConfigs: 'warn'
},
plugins: {
'ckeditor5-rules': ckeditor5Rules,
'@typescript-eslint': ts.plugin
},
settings: {
react: {
version: 'detect'
}
},
files: [
'**/*.js',
'**/*.mjs',
'**/*.ts',
'**/*.tsx'
],
rules: {
'@stylistic/func-call-spacing': 'off',
'@stylistic/function-call-spacing': [ 'error', 'never' ],
'@stylistic/operator-linebreak': 'off',
'react/prop-types': 'off',
'react/no-deprecated': 'off',
'no-console': 'off',
'@stylistic/no-trailing-spaces': 'error',
'ckeditor5-rules/prevent-license-key-leak': 'error',
'ckeditor5-rules/allow-imports-only-from-main-package-entry-point': 'off',
'ckeditor5-rules/license-header': [ 'error', { headerLines: [
'/**',
' * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.',
' * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options',
' */'
] } ],
'ckeditor5-rules/require-file-extensions-in-imports': [
'error',
{
extensions: [ '.ts', '.js', '.json' ]
}
]
}
},
// Rules specific to `tests` folder.
{
files: [ 'tests/**' ],
'rules': {
'react/no-render-return-value': 'off',
'no-unused-expressions': 'off',
'@typescript-eslint/no-unused-expressions': 'off'
}
},
// Rules specific to `demos` folder.
{
'files': [ 'demos/**' ],
'rules': {
'ckeditor5-rules/license-header': 'off'
}
},
// Rules specific to `scripts` folder.
{
files: [ 'scripts/**/*' ],
languageOptions: {
globals: {
...globals.node
}
}
},
// Rules specific to changelog files.
{
extends: ckeditor5Config,
files: [ '.changelog/**/*.md' ],
plugins: {
'ckeditor5-rules': ckeditor5Rules
},
rules: {
'ckeditor5-rules/validate-changelog-entry': [ 'error', {
repositoryType: 'single'
} ]
}
}
] );