Skip to content

Commit b2569db

Browse files
committed
Replace .eslint.json with eslint.config.mjs
1 parent 9cc0cdd commit b2569db

File tree

4 files changed

+646
-834
lines changed

4 files changed

+646
-834
lines changed

.eslintrc.json

Lines changed: 0 additions & 68 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
// eslint.config.js
2+
import { defineConfig } from 'eslint/config';
3+
import tinymceEslintPlugin from '@tinymce/eslint-plugin';
4+
import js from '@eslint/js';
5+
6+
import pluginChaiFriendly from 'eslint-plugin-chai-friendly';
7+
8+
export default defineConfig([
9+
{
10+
plugins: {
11+
'@tinymce': tinymceEslintPlugin
12+
},
13+
extends: [ '@tinymce/standard' ],
14+
files: [
15+
'tinymce-angular-component/src/**/*.ts',
16+
'stories/**/*.ts'
17+
],
18+
ignores: [
19+
'src/demo/demo.ts'
20+
],
21+
languageOptions: {
22+
parserOptions: {
23+
sourceType: 'module',
24+
project: [
25+
'./tsconfig.json'
26+
]
27+
},
28+
},
29+
rules: {
30+
'@tinymce/prefer-fun': 'off',
31+
'@tinymce/prefer-fun': 'off',
32+
'no-underscore-dangle': 'off',
33+
'@typescript-eslint/member-ordering': 'off'
34+
}
35+
},
36+
{
37+
files: [
38+
'**/*.js'
39+
],
40+
env: {
41+
es6: true,
42+
node: true,
43+
browser: true
44+
},
45+
plugins: { js },
46+
extends: [ 'js/recommended' ],
47+
parser: 'espree',
48+
languageOptions: {
49+
parserOptions: {
50+
ecmaVersion: 2020,
51+
sourceType: 'module'
52+
},
53+
},
54+
rules: {
55+
'indent': [ 'error', 2, { 'SwitchCase': 1 } ],
56+
'no-shadow': 'error',
57+
'no-unused-vars': [ 'error', { 'argsIgnorePattern': '^_' } ],
58+
'object-curly-spacing': [ 'error', 'always', { 'arraysInObjects': false, 'objectsInObjects': false } ],
59+
'quotes': [ 'error', 'single' ],
60+
'semi': 'error'
61+
}
62+
},
63+
{
64+
files: [
65+
'**/*Test.ts',
66+
'**/test/**/*.ts'
67+
],
68+
plugins: {
69+
'chai-friendly': pluginChaiFriendly
70+
},
71+
rules: {
72+
'no-unused-expressions': 'off',
73+
'no-console': 'off',
74+
'max-classes-per-file': 'off',
75+
'@typescript-eslint/no-non-null-assertion': 'off'
76+
}
77+
}
78+
]);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"@storybook/blocks": "^8.2.5",
4242
"@storybook/test": "^8.2.5",
4343
"@tinymce/beehive-flow": "^0.19.0",
44-
"@tinymce/eslint-plugin": "^2.3.1",
44+
"@tinymce/eslint-plugin": "^3.0.0",
4545
"@tinymce/miniature": "^6.0.0",
4646
"@types/chai": "^4.3.16",
4747
"@types/node": "^20.14.12",

0 commit comments

Comments
 (0)