Skip to content

Commit

Permalink
Merge pull request #58 from retejs/new-linter
Browse files Browse the repository at this point in the history
fix: update cli and fix linting errors
  • Loading branch information
Ni55aN authored Aug 30, 2024
2 parents 292ad8a + 9d42b67 commit 7e753c0
Show file tree
Hide file tree
Showing 32 changed files with 3,453 additions and 2,368 deletions.
48 changes: 0 additions & 48 deletions .eslintrc

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
node_modules
dist
docs
.vscode
/coverage
.rete-cli
.sonar
50 changes: 50 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import tseslint from 'typescript-eslint'
import react from 'eslint-plugin-react'
import configs, { extendNamingConventions } from 'rete-cli/configs/eslint.mjs'
import globals from 'globals'

export default tseslint.config(
...configs,
{
files: ['**/*.{js,jsx,mjs,cjs,ts,tsx}'],
plugins: {
react,
},
},
react.configs.flat.recommended,
{
languageOptions: {
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
globals: {
...globals.browser,
...globals.es2017
}
}
},
{
rules: {
'@typescript-eslint/naming-convention': [
'error',
...extendNamingConventions(
{
'selector': 'variable',
'format': ['camelCase', 'UPPER_CASE', 'PascalCase'],
'leadingUnderscore': 'allow'
},
{
'selector': 'function',
'format': ['camelCase', 'PascalCase'],
'leadingUnderscore': 'allow'
}
)
],
'@typescript-eslint/no-deprecated': 'warn',
'react/no-deprecated': 'warn',
'@typescript-eslint/unbound-method': 'off'
}
}
)
Loading

0 comments on commit 7e753c0

Please sign in to comment.