Skip to content

Commit

Permalink
fix: update rules in eslint to work with typescript changes
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh committed Oct 16, 2024
1 parent cf5bdee commit 8ea4349
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 30 deletions.
19 changes: 8 additions & 11 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": [
"./tsconfig.app.json",
"./tsconfig.node.json",
"./cypress/tsconfig.json"
],
"ecmaFeatures": {
"jsx": true
},
Expand Down Expand Up @@ -60,6 +65,7 @@
}
],
"import/no-named-as-default": "off",
"import/extensions": "off",
"react/static-property-placement": [
"error",
"property assignment",
Expand All @@ -79,16 +85,6 @@
"allow": ["error"]
}
],
"import/extensions": [
"error",
"ignorePackages",
{
"js": "never",
"jsx": "never",
"ts": "never",
"tsx": "never"
}
],
"react/prop-types": "off",
"react/require-default-props": "off",
// eslint rule reports false error
Expand All @@ -109,7 +105,8 @@
"devDependencies": true
}
],
"import/prefer-default-export": "off"
"import/prefer-default-export": "off",
"import/no-unresolved": "off"
},
"overrides": [
{
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"files.trimTrailingWhitespace": true
"files.trimTrailingWhitespace": true,
"eslint.useFlatConfig": false
}
21 changes: 4 additions & 17 deletions cypress/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,12 @@
"extends": "../tsconfig.app.json",
"compilerOptions": {
"target": "es5",
"lib": [
"es5",
"dom",
"ES2021.String"
],
"types": [
"cypress",
"node",
"vite/client"
],
"lib": ["es5", "dom", "ES2021.String"],
"types": ["cypress", "node", "vite/client"],
"strictNullChecks": true,
"strict": true,
"sourceMap": false
},
"include": [
"**/*.ts"
],
"exclude": [
"coverage",
".nyc_output"
]
"include": ["**/*.ts", "../cypress.config.ts"],
"exclude": ["coverage", ".nyc_output"]
}
2 changes: 1 addition & 1 deletion src/modules/settings/ExportData.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import { useState } from 'react';

import { Button, Stack, Typography } from '@mui/material';

Expand Down
1 change: 1 addition & 0 deletions tsconfig.node.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"noFallthroughCasesInSwitch": true
},
"include": [
"vite-env.d.ts",
"vite.config.ts"
]
}

0 comments on commit 8ea4349

Please sign in to comment.