forked from isaul32/ckeditor5-math
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.cjs
60 lines (58 loc) · 1.69 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
50
51
52
53
54
55
56
57
58
59
60
module.exports = {
extends: [
"ckeditor5",
"plugin:@typescript-eslint/strict",
"plugin:@typescript-eslint/stylistic-type-checked",
],
root: true,
plugins: ["@typescript-eslint"],
parser: "@typescript-eslint/parser",
parserOptions: {
project: true,
__tsconfigRootDir: __dirname,
ecmaVersion: "latest",
sourceType: "module",
},
globals: {
MathJax: true,
katex: true,
console: true,
},
ignorePatterns: [
// Ignore the entire `build/` (the DLL build).
"build/**",
// Ignore compiled JavaScript files, as they are generated automatically.
'src/**/*.js',
// Also, do not check typing declarations, too.
'src/**/*.d.ts'
],
rules: {
// This rule disallows importing core DLL packages directly. Imports should be done using the `ckeditor5` package.
// Also, importing non-DLL packages is not allowed. If the package requires other features to work, they should be
// specified as soft-requirements.
// Read more: https://ckeditor.com/docs/ckeditor5/latest/builds/guides/migration/migration-to-26.html#soft-requirements.
"ckeditor5-rules/ckeditor-imports": "error",
// This rule could not be found ???
"ckeditor5-rules/use-require-for-debug-mode-imports": "off",
"no-void": ["error", { allowAsStatement: true }],
},
overrides: [
{
files: [ 'tests/**/*.[jt]s', 'sample/**/*.[jt]s' ],
rules: {
// To write complex tests, you may need to import files that are not exported in DLL files by default.
// Hence, imports CKEditor 5 packages in test files are not checked.
"ckeditor5-rules/ckeditor-imports": "off",
},
},
{
env: {
node: true,
},
files: [".eslintrc.{js,cjs}"],
parserOptions: {
sourceType: "script",
},
},
],
};