Skip to content

Commit

Permalink
Merge pull request #21 from utopia-os/eslint-standart
Browse files Browse the repository at this point in the history
fix(other): eslint standard
  • Loading branch information
ulfgebhardt authored Nov 2, 2024
2 parents 39de17f + 107f7da commit 3464ead
Show file tree
Hide file tree
Showing 125 changed files with 5,184 additions and 4,466 deletions.
230 changes: 115 additions & 115 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
// eslint-disable-next-line no-undef
module.exports = {
env: {
browser: true,
es2021: true
},
extends: [
// 'standard',
'eslint:recommended',
//'plugin:@eslint-community/eslint-comments/recommended',
//'plugin:@typescript-eslint/recommended',
//'plugin:import/recommended',
//'plugin:import/typescript',
//'plugin:promise/recommended',
//'plugin:security/recommended-legacy',
'plugin:react/recommended',
],
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
plugins: [
//'@typescript-eslint',
//'import',
//'promise',
//'security',
//'no-catch-all',
'react',
'react-hooks',
],
settings: {
//'import/resolver': {
// typescript: true,
// node: true,
//},
'react': {
'version': 'detect'
}
},
rules: {
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
'react/react-in-jsx-scope': 'off' // Disable requirement for React import
env: {
browser: true,
es2021: true
},
extends: [
'standard',
'eslint:recommended',
// 'plugin:@eslint-community/eslint-comments/recommended',
// 'plugin:@typescript-eslint/recommended',
// 'plugin:import/recommended',
// 'plugin:import/typescript',
// 'plugin:promise/recommended',
// 'plugin:security/recommended-legacy',
'plugin:react/recommended'
],
parserOptions: {
ecmaVersion: 'latest',
parser: '@typescript-eslint/parser',
sourceType: 'module'
},
plugins: [
// '@typescript-eslint',
// 'import',
// 'promise',
// 'security',
// 'no-catch-all',
'react',
'react-hooks'
],
settings: {
// 'import/resolver': {
// typescript: true,
// node: true,
// },
react: {
version: 'detect'
}
},
rules: {
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'warn', // Checks effect dependencies
'react/react-in-jsx-scope': 'off' // Disable requirement for React import
// 'no-catch-all/no-catch-all': 'error',
// 'no-console': 'error',
// 'no-debugger': 'error',
Expand Down Expand Up @@ -135,78 +135,78 @@ module.exports = {
// 'promise/valid-params': 'warn',
// 'promise/prefer-await-to-callbacks': 'error',
// 'promise/no-multiple-resolved': 'error',
},
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser'
// parserOptions: {
// tsconfigRootDir: __dirname,
// project: ['./tsconfig.json', '**/tsconfig.json'],
// ecmaVersion: 'latest',
// parser: '@typescript-eslint/parser',
// sourceType: 'module',
// },
// plugins: ['@typescript-eslint'],
// extends: [
// 'plugin:@typescript-eslint/recommended',
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
// 'plugin:@typescript-eslint/strict',
// ],
// rules: {
// // allow explicitly defined dangling promises
// '@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
// 'no-void': ['error', { allowAsStatement: true }],
// },
// },
// {
// files: ['!*.json'],
// plugins: ['prettier'],
// extends: ['plugin:prettier/recommended'],
// rules: {
// 'prettier/prettier': 'error',
// },
},
overrides: [
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
// parserOptions: {
// tsconfigRootDir: __dirname,
// project: ['./tsconfig.json', '**/tsconfig.json'],
// ecmaVersion: 'latest',
// parser: '@typescript-eslint/parser',
// sourceType: 'module',
// },
// plugins: ['@typescript-eslint'],
// extends: [
// 'plugin:@typescript-eslint/recommended',
// 'plugin:@typescript-eslint/recommended-requiring-type-checking',
// 'plugin:@typescript-eslint/strict',
// ],
// rules: {
// // allow explicitly defined dangling promises
// '@typescript-eslint/no-floating-promises': ['error', { ignoreVoid: true }],
// 'no-void': ['error', { allowAsStatement: true }],
// },
// },
// {
// files: ['!*.json'],
// plugins: ['prettier'],
// extends: ['plugin:prettier/recommended'],
// rules: {
// 'prettier/prettier': 'error',
// },
},
{
files: ['*.json'],
plugins: ['json'],
extends: ['plugin:json/recommended-with-comments'],
},
// {
// files: ['*.{test,spec}.[tj]s'],
// plugins: ['vitest'],
// extends: ['plugin:vitest/all'],
// rules: {
// 'vitest/prefer-lowercase-title': 'off',
// 'vitest/no-hooks': 'off',
// 'vitest/consistent-test-filename': 'off',
// 'vitest/prefer-expect-assertions': [
// 'off',
// {
// onlyFunctionsWithExpectInLoop: true,
// onlyFunctionsWithExpectInCallback: true,
// },
// ],
// 'vitest/prefer-strict-equal': 'off',
// 'vitest/prefer-to-be-falsy': 'off',
// 'vitest/prefer-to-be-truthy': 'off',
// 'vitest/require-hook': [
// 'error',
// {
// allowedFunctionCalls: [
// 'mockClient.setRequestHandler',
// 'setActivePinia',
// 'provideApolloClient',
// ],
// },
// ],
// },
// },
{
files: ['*.yaml', '*.yml'],
parser: 'yaml-eslint-parser',
plugins: ['yml'],
extends: ['plugin:yml/prettier'],
},
],
{
files: ['*.json'],
plugins: ['json'],
extends: ['plugin:json/recommended-with-comments']
},
// {
// files: ['*.{test,spec}.[tj]s'],
// plugins: ['vitest'],
// extends: ['plugin:vitest/all'],
// rules: {
// 'vitest/prefer-lowercase-title': 'off',
// 'vitest/no-hooks': 'off',
// 'vitest/consistent-test-filename': 'off',
// 'vitest/prefer-expect-assertions': [
// 'off',
// {
// onlyFunctionsWithExpectInLoop: true,
// onlyFunctionsWithExpectInCallback: true,
// },
// ],
// 'vitest/prefer-strict-equal': 'off',
// 'vitest/prefer-to-be-falsy': 'off',
// 'vitest/prefer-to-be-truthy': 'off',
// 'vitest/require-hook': [
// 'error',
// {
// allowedFunctionCalls: [
// 'mockClient.setRequestHandler',
// 'setActivePinia',
// 'provideApolloClient',
// ],
// },
// ],
// },
// },
{
files: ['*.yaml', '*.yml'],
parser: 'yaml-eslint-parser',
plugins: ['yml'],
extends: ['plugin:yml/prettier']
}
]
}
Loading

0 comments on commit 3464ead

Please sign in to comment.