Skip to content

Commit 7e753c0

Browse files
authored
Merge pull request #58 from retejs/new-linter
fix: update cli and fix linting errors
2 parents 292ad8a + 9d42b67 commit 7e753c0

32 files changed

+3453
-2368
lines changed

.eslintrc

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

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
node_modules
22
dist
33
docs
4+
.vscode
5+
/coverage
6+
.rete-cli
7+
.sonar

eslint.config.mjs

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import tseslint from 'typescript-eslint'
2+
import react from 'eslint-plugin-react'
3+
import configs, { extendNamingConventions } from 'rete-cli/configs/eslint.mjs'
4+
import globals from 'globals'
5+
6+
export default tseslint.config(
7+
...configs,
8+
{
9+
files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
10+
plugins: {
11+
react,
12+
},
13+
},
14+
react.configs.flat.recommended,
15+
{
16+
languageOptions: {
17+
parserOptions: {
18+
ecmaFeatures: {
19+
jsx: true,
20+
},
21+
},
22+
globals: {
23+
...globals.browser,
24+
...globals.es2017
25+
}
26+
}
27+
},
28+
{
29+
rules: {
30+
'@typescript-eslint/naming-convention': [
31+
'error',
32+
...extendNamingConventions(
33+
{
34+
'selector': 'variable',
35+
'format': ['camelCase', 'UPPER_CASE', 'PascalCase'],
36+
'leadingUnderscore': 'allow'
37+
},
38+
{
39+
'selector': 'function',
40+
'format': ['camelCase', 'PascalCase'],
41+
'leadingUnderscore': 'allow'
42+
}
43+
)
44+
],
45+
'@typescript-eslint/no-deprecated': 'warn',
46+
'react/no-deprecated': 'warn',
47+
'@typescript-eslint/unbound-method': 'off'
48+
}
49+
}
50+
)

0 commit comments

Comments
 (0)