Skip to content

Commit

Permalink
chore: update eslint files to run properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Ferraz committed Oct 1, 2023
1 parent e390ac1 commit 60e89d1
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 71 deletions.
54 changes: 54 additions & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
module.exports = {
env: {
browser: true,
es2021: true,
},
extends: [
'airbnb',
'airbnb-typescript',
'airbnb/hooks',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/jsx-runtime',
'plugin:prettier/recommended',
],
overrides: [],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: './tsconfig.json',
},
plugins: ['react', '@typescript-eslint', 'prettier'],
rules: {
'no-console': 'error',
'import/export': 'off',
'import/extensions': 'off',
'import/prefer-default-export': 'off',
'import/no-extraneous-dependencies': 'off',
'sort-imports': 'off',
'no-plusplus': 'off',
'no-param-reassign': 'off',
'no-useless-return': 'off',
'class-methods-use-this': 'off',
'no-restricted-syntax': 'off',
'react/prop-types': 'off',
'react/button-has-type': 'off',
'react/jsx-props-no-spreading': 'off',
'react/function-component-definition': 'off',
'react/destructuring-assignment': 'off',
'react/jsx-no-useless-fragment': 'off',
'react-hooks/exhaustive-deps': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/no-shadow': 'off',
},
settings: {
'import/resolver': {
node: {
extensions: ['.js', '.jsx', '.ts', '.tsx'],
},
},
},
};
53 changes: 0 additions & 53 deletions .eslintrc.json

This file was deleted.

6 changes: 6 additions & 0 deletions .prettierrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
trailingComma: "es5",
tabWidth: 2,
semi: true,
singleQuote: true
}
6 changes: 0 additions & 6 deletions .prettierrc.json

This file was deleted.

18 changes: 7 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"env:dev": "rm -rf .env && cat ./envs/dev/.env >> .env",
"pretest": "npm run env:test",
"test": "vitest run --coverage",
"lint": "eslint --fix src",
"linting": "eslint --ext .js,.cjs,.ts,.tsx . --fix",
"preview": "vite preview"
},
"dependencies": {
Expand All @@ -31,26 +31,22 @@
"@testing-library/jest-dom": "^6.1.2",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.4.3",
"@types/css-mediaquery": "^0.1.1",
"@types/react": "^18.0.28",
"@types/react-dom": "^18.0.11",
"@types/uuid": "^9.0.4",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"@typescript-eslint/eslint-plugin": "^6.7.3",
"@typescript-eslint/parser": "^6.7.3",
"@vitejs/plugin-react": "^4.0.0",
"@vitest/coverage-v8": "^0.34.2",
"css-mediaquery": "^0.1.2",
"cypress": "^12.17.4",
"eslint": "^8.45.0",
"eslint": "^8.50.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^8.9.0",
"eslint-plugin-import": "^2.27.5",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-prettier": "^5.0.0",
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.3.4",
"jsdom": "^22.1.0",
"json-server": "^0.17.3",
"msw": "^1.3.1",
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": ["vitest.config.ts", "vite.config.ts", "src", "tests", "src/custom.d.ts"],
"include": [".eslintrc.cjs", "vitest.config.ts", "vite.config.ts", "src", "tests", "src/custom.d.ts"],
}

0 comments on commit 60e89d1

Please sign in to comment.