mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +08:00
Merge pull request #2047 from TriliumNext/renovate/eslint-config-ckeditor5-10.x-lockfile
chore(deps): update dependency eslint-config-ckeditor5 to v10
This commit is contained in:
commit
74b7420942
@ -93,7 +93,6 @@
|
|||||||
"node-abi": "4.9.0",
|
"node-abi": "4.9.0",
|
||||||
"@types/express-serve-static-core": "5.0.6",
|
"@types/express-serve-static-core": "5.0.6",
|
||||||
"flat@<5.0.1": ">=5.0.1",
|
"flat@<5.0.1": ">=5.0.1",
|
||||||
"minimatch@<3.0.5": ">=3.0.5",
|
|
||||||
"debug@>=3.2.0 <3.2.7": ">=3.2.7",
|
"debug@>=3.2.0 <3.2.7": ">=3.2.7",
|
||||||
"nanoid@<3.3.8": ">=3.3.8",
|
"nanoid@<3.3.8": ">=3.3.8",
|
||||||
"nanoid@>=4.0.0 <5.0.9": ">=5.0.9",
|
"nanoid@>=4.0.0 <5.0.9": ">=5.0.9",
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
/* eslint-env node */
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
extends: 'ckeditor5',
|
|
||||||
parser: '@typescript-eslint/parser',
|
|
||||||
plugins: [
|
|
||||||
'@typescript-eslint'
|
|
||||||
],
|
|
||||||
root: true,
|
|
||||||
ignorePatterns: [
|
|
||||||
// Ignore the entire `dist/` (the NIM build).
|
|
||||||
'dist/**',
|
|
||||||
// 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 from any path other than the package main entrypoint.
|
|
||||||
'ckeditor5-rules/allow-imports-only-from-main-package-entry-point': 'error',
|
|
||||||
// This rule ensures that all imports from `@ckeditor/*` packages are done through the main package entry points.
|
|
||||||
// This is required for the editor types to work properly and to ease migration to the installation methods
|
|
||||||
// introduced in CKEditor 5 version 42.0.0.
|
|
||||||
'ckeditor5-rules/no-legacy-imports': '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: [
|
|
||||||
{
|
|
||||||
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'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
83
packages/ckeditor5-admonition/eslint.config.js
Normal file
83
packages/ckeditor5-admonition/eslint.config.js
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
import globals from 'globals';
|
||||||
|
import { defineConfig } from 'eslint/config';
|
||||||
|
import eslintConfigCKEditor5 from 'eslint-config-ckeditor5';
|
||||||
|
import eslintPluginCKEditor5Rules from 'eslint-plugin-ckeditor5-rules';
|
||||||
|
|
||||||
|
export default defineConfig( [
|
||||||
|
eslintConfigCKEditor5,
|
||||||
|
{
|
||||||
|
name: 'Ignored files config',
|
||||||
|
ignores: [
|
||||||
|
// Ignore compiled JavaScript files, as they are generated automatically.
|
||||||
|
'src/**/*.js',
|
||||||
|
// Also, do not check typing declarations, too.
|
||||||
|
'src/**/*.d.ts',
|
||||||
|
// Ignore the entire `dist/` (the NIM build).
|
||||||
|
'dist/**'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Base config',
|
||||||
|
languageOptions: {
|
||||||
|
ecmaVersion: 'latest',
|
||||||
|
sourceType: 'module'
|
||||||
|
},
|
||||||
|
linterOptions: {
|
||||||
|
reportUnusedInlineConfigs: 'error',
|
||||||
|
reportUnusedDisableDirectives: 'error'
|
||||||
|
},
|
||||||
|
plugins: {
|
||||||
|
'ckeditor5-rules': eslintPluginCKEditor5Rules
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
// 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' ]
|
||||||
|
} ],
|
||||||
|
// This rule ensures that all imports from `@ckeditor/*` packages are done through the main package entry points.
|
||||||
|
// This is required for the editor types to work properly and to ease migration to the installation methods
|
||||||
|
// introduced in CKEditor 5 version 42.0.0.
|
||||||
|
'ckeditor5-rules/no-legacy-imports': 'error'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'NodeJS environment config',
|
||||||
|
files: [
|
||||||
|
'./scripts/**/*.{js,mjs,cjs}'
|
||||||
|
],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.node
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Browser environment config',
|
||||||
|
files: [
|
||||||
|
'./sample/**/*.{ts,mts,cts}',
|
||||||
|
'./src/**/*.{ts,mts,cts}',
|
||||||
|
'./tests/**/*.{ts,mts,cts}',
|
||||||
|
'./typings/**/*.d.ts'
|
||||||
|
],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Sample and tests config',
|
||||||
|
files: [
|
||||||
|
'sample/**/*.{ts,mts,cts}',
|
||||||
|
'tests/**/*.{ts,mts,cts}'
|
||||||
|
],
|
||||||
|
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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
] );
|
@ -1,46 +0,0 @@
|
|||||||
/* eslint-env node */
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
extends: 'ckeditor5',
|
|
||||||
parser: '@typescript-eslint/parser',
|
|
||||||
plugins: [
|
|
||||||
'@typescript-eslint'
|
|
||||||
],
|
|
||||||
root: true,
|
|
||||||
ignorePatterns: [
|
|
||||||
// Ignore the entire `dist/` (the NIM build).
|
|
||||||
'dist/**',
|
|
||||||
// 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 from any path other than the package main entrypoint.
|
|
||||||
'ckeditor5-rules/allow-imports-only-from-main-package-entry-point': 'error',
|
|
||||||
// This rule ensures that all imports from `@ckeditor/*` packages are done through the main package entry points.
|
|
||||||
// This is required for the editor types to work properly and to ease migration to the installation methods
|
|
||||||
// introduced in CKEditor 5 version 42.0.0.
|
|
||||||
'ckeditor5-rules/no-legacy-imports': '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: [
|
|
||||||
{
|
|
||||||
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'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
83
packages/ckeditor5-footnotes/eslint.config.js
Normal file
83
packages/ckeditor5-footnotes/eslint.config.js
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
import globals from 'globals';
|
||||||
|
import { defineConfig } from 'eslint/config';
|
||||||
|
import eslintConfigCKEditor5 from 'eslint-config-ckeditor5';
|
||||||
|
import eslintPluginCKEditor5Rules from 'eslint-plugin-ckeditor5-rules';
|
||||||
|
|
||||||
|
export default defineConfig( [
|
||||||
|
eslintConfigCKEditor5,
|
||||||
|
{
|
||||||
|
name: 'Ignored files config',
|
||||||
|
ignores: [
|
||||||
|
// Ignore compiled JavaScript files, as they are generated automatically.
|
||||||
|
'src/**/*.js',
|
||||||
|
// Also, do not check typing declarations, too.
|
||||||
|
'src/**/*.d.ts',
|
||||||
|
// Ignore the entire `dist/` (the NIM build).
|
||||||
|
'dist/**'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Base config',
|
||||||
|
languageOptions: {
|
||||||
|
ecmaVersion: 'latest',
|
||||||
|
sourceType: 'module'
|
||||||
|
},
|
||||||
|
linterOptions: {
|
||||||
|
reportUnusedInlineConfigs: 'error',
|
||||||
|
reportUnusedDisableDirectives: 'error'
|
||||||
|
},
|
||||||
|
plugins: {
|
||||||
|
'ckeditor5-rules': eslintPluginCKEditor5Rules
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
// 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' ]
|
||||||
|
} ],
|
||||||
|
// This rule ensures that all imports from `@ckeditor/*` packages are done through the main package entry points.
|
||||||
|
// This is required for the editor types to work properly and to ease migration to the installation methods
|
||||||
|
// introduced in CKEditor 5 version 42.0.0.
|
||||||
|
'ckeditor5-rules/no-legacy-imports': 'error'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'NodeJS environment config',
|
||||||
|
files: [
|
||||||
|
'./scripts/**/*.{js,mjs,cjs}'
|
||||||
|
],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.node
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Browser environment config',
|
||||||
|
files: [
|
||||||
|
'./sample/**/*.{ts,mts,cts}',
|
||||||
|
'./src/**/*.{ts,mts,cts}',
|
||||||
|
'./tests/**/*.{ts,mts,cts}',
|
||||||
|
'./typings/**/*.d.ts'
|
||||||
|
],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Sample and tests config',
|
||||||
|
files: [
|
||||||
|
'sample/**/*.{ts,mts,cts}',
|
||||||
|
'tests/**/*.{ts,mts,cts}'
|
||||||
|
],
|
||||||
|
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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
] );
|
@ -1,46 +0,0 @@
|
|||||||
/* eslint-env node */
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
extends: 'ckeditor5',
|
|
||||||
parser: '@typescript-eslint/parser',
|
|
||||||
plugins: [
|
|
||||||
'@typescript-eslint'
|
|
||||||
],
|
|
||||||
root: true,
|
|
||||||
ignorePatterns: [
|
|
||||||
// Ignore the entire `dist/` (the NIM build).
|
|
||||||
'dist/**',
|
|
||||||
// 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 from any path other than the package main entrypoint.
|
|
||||||
'ckeditor5-rules/allow-imports-only-from-main-package-entry-point': 'error',
|
|
||||||
// This rule ensures that all imports from `@ckeditor/*` packages are done through the main package entry points.
|
|
||||||
// This is required for the editor types to work properly and to ease migration to the installation methods
|
|
||||||
// introduced in CKEditor 5 version 42.0.0.
|
|
||||||
'ckeditor5-rules/no-legacy-imports': '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: [
|
|
||||||
{
|
|
||||||
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'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
83
packages/ckeditor5-keyboard-marker/eslint.config.js
Normal file
83
packages/ckeditor5-keyboard-marker/eslint.config.js
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
import globals from 'globals';
|
||||||
|
import { defineConfig } from 'eslint/config';
|
||||||
|
import eslintConfigCKEditor5 from 'eslint-config-ckeditor5';
|
||||||
|
import eslintPluginCKEditor5Rules from 'eslint-plugin-ckeditor5-rules';
|
||||||
|
|
||||||
|
export default defineConfig( [
|
||||||
|
eslintConfigCKEditor5,
|
||||||
|
{
|
||||||
|
name: 'Ignored files config',
|
||||||
|
ignores: [
|
||||||
|
// Ignore compiled JavaScript files, as they are generated automatically.
|
||||||
|
'src/**/*.js',
|
||||||
|
// Also, do not check typing declarations, too.
|
||||||
|
'src/**/*.d.ts',
|
||||||
|
// Ignore the entire `dist/` (the NIM build).
|
||||||
|
'dist/**'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Base config',
|
||||||
|
languageOptions: {
|
||||||
|
ecmaVersion: 'latest',
|
||||||
|
sourceType: 'module'
|
||||||
|
},
|
||||||
|
linterOptions: {
|
||||||
|
reportUnusedInlineConfigs: 'error',
|
||||||
|
reportUnusedDisableDirectives: 'error'
|
||||||
|
},
|
||||||
|
plugins: {
|
||||||
|
'ckeditor5-rules': eslintPluginCKEditor5Rules
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
// 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' ]
|
||||||
|
} ],
|
||||||
|
// This rule ensures that all imports from `@ckeditor/*` packages are done through the main package entry points.
|
||||||
|
// This is required for the editor types to work properly and to ease migration to the installation methods
|
||||||
|
// introduced in CKEditor 5 version 42.0.0.
|
||||||
|
'ckeditor5-rules/no-legacy-imports': 'error'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'NodeJS environment config',
|
||||||
|
files: [
|
||||||
|
'./scripts/**/*.{js,mjs,cjs}'
|
||||||
|
],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.node
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Browser environment config',
|
||||||
|
files: [
|
||||||
|
'./sample/**/*.{ts,mts,cts}',
|
||||||
|
'./src/**/*.{ts,mts,cts}',
|
||||||
|
'./tests/**/*.{ts,mts,cts}',
|
||||||
|
'./typings/**/*.d.ts'
|
||||||
|
],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Sample and tests config',
|
||||||
|
files: [
|
||||||
|
'sample/**/*.{ts,mts,cts}',
|
||||||
|
'tests/**/*.{ts,mts,cts}'
|
||||||
|
],
|
||||||
|
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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
] );
|
@ -1,46 +0,0 @@
|
|||||||
/* eslint-env node */
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
extends: 'ckeditor5',
|
|
||||||
parser: '@typescript-eslint/parser',
|
|
||||||
plugins: [
|
|
||||||
'@typescript-eslint'
|
|
||||||
],
|
|
||||||
root: true,
|
|
||||||
ignorePatterns: [
|
|
||||||
// Ignore the entire `dist/` (the NIM build).
|
|
||||||
'dist/**',
|
|
||||||
// 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 from any path other than the package main entrypoint.
|
|
||||||
'ckeditor5-rules/allow-imports-only-from-main-package-entry-point': 'error',
|
|
||||||
// This rule ensures that all imports from `@ckeditor/*` packages are done through the main package entry points.
|
|
||||||
// This is required for the editor types to work properly and to ease migration to the installation methods
|
|
||||||
// introduced in CKEditor 5 version 42.0.0.
|
|
||||||
'ckeditor5-rules/no-legacy-imports': '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: [
|
|
||||||
{
|
|
||||||
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'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
83
packages/ckeditor5-math/eslint.config.js
Normal file
83
packages/ckeditor5-math/eslint.config.js
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
import globals from 'globals';
|
||||||
|
import { defineConfig } from 'eslint/config';
|
||||||
|
import eslintConfigCKEditor5 from 'eslint-config-ckeditor5';
|
||||||
|
import eslintPluginCKEditor5Rules from 'eslint-plugin-ckeditor5-rules';
|
||||||
|
|
||||||
|
export default defineConfig( [
|
||||||
|
eslintConfigCKEditor5,
|
||||||
|
{
|
||||||
|
name: 'Ignored files config',
|
||||||
|
ignores: [
|
||||||
|
// Ignore compiled JavaScript files, as they are generated automatically.
|
||||||
|
'src/**/*.js',
|
||||||
|
// Also, do not check typing declarations, too.
|
||||||
|
'src/**/*.d.ts',
|
||||||
|
// Ignore the entire `dist/` (the NIM build).
|
||||||
|
'dist/**'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Base config',
|
||||||
|
languageOptions: {
|
||||||
|
ecmaVersion: 'latest',
|
||||||
|
sourceType: 'module'
|
||||||
|
},
|
||||||
|
linterOptions: {
|
||||||
|
reportUnusedInlineConfigs: 'error',
|
||||||
|
reportUnusedDisableDirectives: 'error'
|
||||||
|
},
|
||||||
|
plugins: {
|
||||||
|
'ckeditor5-rules': eslintPluginCKEditor5Rules
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
// 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' ]
|
||||||
|
} ],
|
||||||
|
// This rule ensures that all imports from `@ckeditor/*` packages are done through the main package entry points.
|
||||||
|
// This is required for the editor types to work properly and to ease migration to the installation methods
|
||||||
|
// introduced in CKEditor 5 version 42.0.0.
|
||||||
|
'ckeditor5-rules/no-legacy-imports': 'error'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'NodeJS environment config',
|
||||||
|
files: [
|
||||||
|
'./scripts/**/*.{js,mjs,cjs}'
|
||||||
|
],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.node
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Browser environment config',
|
||||||
|
files: [
|
||||||
|
'./sample/**/*.{ts,mts,cts}',
|
||||||
|
'./src/**/*.{ts,mts,cts}',
|
||||||
|
'./tests/**/*.{ts,mts,cts}',
|
||||||
|
'./typings/**/*.d.ts'
|
||||||
|
],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Sample and tests config',
|
||||||
|
files: [
|
||||||
|
'sample/**/*.{ts,mts,cts}',
|
||||||
|
'tests/**/*.{ts,mts,cts}'
|
||||||
|
],
|
||||||
|
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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
] );
|
@ -1,46 +0,0 @@
|
|||||||
/* eslint-env node */
|
|
||||||
|
|
||||||
'use strict';
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
extends: 'ckeditor5',
|
|
||||||
parser: '@typescript-eslint/parser',
|
|
||||||
plugins: [
|
|
||||||
'@typescript-eslint'
|
|
||||||
],
|
|
||||||
root: true,
|
|
||||||
ignorePatterns: [
|
|
||||||
// Ignore the entire `dist/` (the NIM build).
|
|
||||||
'dist/**',
|
|
||||||
// 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 from any path other than the package main entrypoint.
|
|
||||||
'ckeditor5-rules/allow-imports-only-from-main-package-entry-point': 'error',
|
|
||||||
// This rule ensures that all imports from `@ckeditor/*` packages are done through the main package entry points.
|
|
||||||
// This is required for the editor types to work properly and to ease migration to the installation methods
|
|
||||||
// introduced in CKEditor 5 version 42.0.0.
|
|
||||||
'ckeditor5-rules/no-legacy-imports': '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: [
|
|
||||||
{
|
|
||||||
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'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
83
packages/ckeditor5-mermaid/eslint.config.js
Normal file
83
packages/ckeditor5-mermaid/eslint.config.js
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
import globals from 'globals';
|
||||||
|
import { defineConfig } from 'eslint/config';
|
||||||
|
import eslintConfigCKEditor5 from 'eslint-config-ckeditor5';
|
||||||
|
import eslintPluginCKEditor5Rules from 'eslint-plugin-ckeditor5-rules';
|
||||||
|
|
||||||
|
export default defineConfig( [
|
||||||
|
eslintConfigCKEditor5,
|
||||||
|
{
|
||||||
|
name: 'Ignored files config',
|
||||||
|
ignores: [
|
||||||
|
// Ignore compiled JavaScript files, as they are generated automatically.
|
||||||
|
'src/**/*.js',
|
||||||
|
// Also, do not check typing declarations, too.
|
||||||
|
'src/**/*.d.ts',
|
||||||
|
// Ignore the entire `dist/` (the NIM build).
|
||||||
|
'dist/**'
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Base config',
|
||||||
|
languageOptions: {
|
||||||
|
ecmaVersion: 'latest',
|
||||||
|
sourceType: 'module'
|
||||||
|
},
|
||||||
|
linterOptions: {
|
||||||
|
reportUnusedInlineConfigs: 'error',
|
||||||
|
reportUnusedDisableDirectives: 'error'
|
||||||
|
},
|
||||||
|
plugins: {
|
||||||
|
'ckeditor5-rules': eslintPluginCKEditor5Rules
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
// 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' ]
|
||||||
|
} ],
|
||||||
|
// This rule ensures that all imports from `@ckeditor/*` packages are done through the main package entry points.
|
||||||
|
// This is required for the editor types to work properly and to ease migration to the installation methods
|
||||||
|
// introduced in CKEditor 5 version 42.0.0.
|
||||||
|
'ckeditor5-rules/no-legacy-imports': 'error'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'NodeJS environment config',
|
||||||
|
files: [
|
||||||
|
'./scripts/**/*.{js,mjs,cjs}'
|
||||||
|
],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.node
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Browser environment config',
|
||||||
|
files: [
|
||||||
|
'./sample/**/*.{ts,mts,cts}',
|
||||||
|
'./src/**/*.{ts,mts,cts}',
|
||||||
|
'./tests/**/*.{ts,mts,cts}',
|
||||||
|
'./typings/**/*.d.ts'
|
||||||
|
],
|
||||||
|
languageOptions: {
|
||||||
|
globals: {
|
||||||
|
...globals.browser
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'Sample and tests config',
|
||||||
|
files: [
|
||||||
|
'sample/**/*.{ts,mts,cts}',
|
||||||
|
'tests/**/*.{ts,mts,cts}'
|
||||||
|
],
|
||||||
|
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'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
] );
|
@ -136,8 +136,7 @@ export function createSearchHighlighter() {
|
|||||||
} else {
|
} else {
|
||||||
return v.matches;
|
return v.matches;
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
provide: (plugin) => plugin
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1040
pnpm-lock.yaml
generated
1040
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user