Skip to content

Commit c1642fa

Browse files
committed
Restore eslint
1 parent 211d9ee commit c1642fa

1 file changed

Lines changed: 77 additions & 0 deletions

File tree

eslint.config.mjs

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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+
'no-underscore-dangle': 'off',
32+
'@typescript-eslint/member-ordering': 'off',
33+
}
34+
},
35+
{
36+
files: [
37+
'**/*.js'
38+
],
39+
env: {
40+
es6: true,
41+
node: true,
42+
browser: true
43+
},
44+
plugins: { js },
45+
extends: [ 'js/recommended' ],
46+
parser: 'espree',
47+
languageOptions: {
48+
parserOptions: {
49+
ecmaVersion: 2020,
50+
sourceType: 'module'
51+
},
52+
},
53+
rules: {
54+
'indent': [ 'error', 2, { 'SwitchCase': 1 } ],
55+
'no-shadow': 'error',
56+
'no-unused-vars': [ 'error', { 'argsIgnorePattern': '^_' } ],
57+
'object-curly-spacing': [ 'error', 'always', { 'arraysInObjects': false, 'objectsInObjects': false } ],
58+
'quotes': [ 'error', 'single' ],
59+
'semi': 'error'
60+
}
61+
},
62+
{
63+
files: [
64+
'**/*Test.ts',
65+
'**/test/**/*.ts'
66+
],
67+
plugins: {
68+
'chai-friendly': pluginChaiFriendly
69+
},
70+
rules: {
71+
'no-unused-expressions': 'off',
72+
'no-console': 'off',
73+
'max-classes-per-file': 'off',
74+
'@typescript-eslint/no-non-null-assertion': 'off'
75+
}
76+
}
77+
]);

0 commit comments

Comments
 (0)