mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-11 11:02:27 +08:00
Update eslint rules.
This commit is contained in:
parent
ed2f428e77
commit
e28e5d23e2
@ -5,12 +5,28 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
extends: 'ckeditor5',
|
extends: 'ckeditor5',
|
||||||
root: true,
|
root: true,
|
||||||
|
ignorePatterns: [
|
||||||
|
// Ignore the entire `build/` (the DLL build).
|
||||||
|
'build/**',
|
||||||
|
// Ignore the entire `dist/`.
|
||||||
|
'dist/**'
|
||||||
|
],
|
||||||
rules: {
|
rules: {
|
||||||
// This rule disallows importing core DLL packages directly. Imports should be done using the `ckeditor5` package.
|
// 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
|
// Also, importing non-DLL packages is not allowed. If the package requires other features to work, they should be
|
||||||
// specified as soft-requirements.
|
// specified as soft-requirements.
|
||||||
// Read more: https://ckeditor.com/docs/ckeditor5/latest/builds/guides/migration/migration-to-26.html#soft-requirements.
|
// Read more: https://ckeditor.com/docs/ckeditor5/latest/builds/guides/migration/migration-to-26.html#soft-requirements.
|
||||||
'ckeditor5-rules/ckeditor-imports': 'error'
|
'ckeditor5-rules/ckeditor-imports': 'error',
|
||||||
|
// This rule disallows importing from any path other than the package main entrypoint.
|
||||||
|
'ckeditor5-rules/allow-imports-only-from-main-package-entry-point': 'error',
|
||||||
|
// As required by the ECMAScript (ESM) standard, all imports must include a file extension.
|
||||||
|
// If the import does not include it, this rule will try to automatically detect the correct file extension.
|
||||||
|
'ckeditor5-rules/require-file-extensions-in-imports': [
|
||||||
|
'error',
|
||||||
|
{
|
||||||
|
extensions: [ '.ts', '.js', '.json' ]
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
@ -21,11 +37,5 @@ module.exports = {
|
|||||||
'ckeditor5-rules/ckeditor-imports': 'off'
|
'ckeditor5-rules/ckeditor-imports': 'off'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
|
||||||
ignorePatterns: [
|
|
||||||
// Ignore the entire `build/` (the DLL build).
|
|
||||||
'build/**',
|
|
||||||
// Ignore the entire `dist/`.
|
|
||||||
'dist/**'
|
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
"@ckeditor/ckeditor5-package-tools": "^2.0.0-alpha.0",
|
"@ckeditor/ckeditor5-package-tools": "^2.0.0-alpha.0",
|
||||||
"ckeditor5": "nightly",
|
"ckeditor5": "nightly",
|
||||||
"eslint": "^7.32.0",
|
"eslint": "^7.32.0",
|
||||||
"eslint-config-ckeditor5": ">=3.1.1",
|
"eslint-config-ckeditor5": "^6.0.0",
|
||||||
"http-server": "^14.1.0",
|
"http-server": "^14.1.0",
|
||||||
"husky": "^4.2.5",
|
"husky": "^4.2.5",
|
||||||
"lint-staged": "^10.2.6",
|
"lint-staged": "^10.2.6",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user