Skip to content
Snippets Groups Projects
Commit 19688fa0 authored by Bastien DUMONT's avatar Bastien DUMONT :angel:
Browse files

restore some rules

parent 54cd7bd0
No related branches found
No related tags found
1 merge request!113chore(deps): update typescript-eslint monorepo to v6 (major)
Pipeline #72505 failed
module.exports = {
parser: '@typescript-eslint/parser',
extends: [
'plugin:react/recommended', // Recommended React rules
'prettier', // Disable conflicting ESLint rules for Prettier
'plugin:prettier/recommended', // Enable Prettier as an ESLint rule
'plugin:react-hooks/recommended', // Recommended React Hooks rules
'plugin:@typescript-eslint/recommended-type-checked',
'plugin:@typescript-eslint/stylistic-type-checked',
'plugin:react/recommended', // Uses the recommended rules from @eslint-plugin-react
'plugin:@typescript-eslint/eslint-recommended', // Uses the recommended rules from @typescript-eslint/eslint-plugin
'prettier', // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
'plugin:prettier/recommended', // Enables eslint-plugin-prettier and displays prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array.
'plugin:react-hooks/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/stylistic',
],
plugins: ['@typescript-eslint'], // Enable TypeScript plugin
parserOptions: {
ecmaVersion: 2020, // Parse modern ECMAScript features
sourceType: 'module', // Use imports
ecmaVersion: 2020, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
ecmaFeatures: {
jsx: true, // Parse JSX
jsx: true, // Allows for the parsing of JSX
},
project: true, // Specify TypeScript project
tsconfigRootDir: __dirname,
// project: true,
},
root: true,
rules: {
// You can add or override ESLint rules here
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'warn',
'react/self-closing-comp': 'warn',
'@typescript-eslint/no-explicit-any': 'warn',
},
settings: {
react: {
version: 'detect', // Auto-detect React version
version: 'detect', // Tells eslint-plugin-react to automatically detect the version of React to use
},
},
}
......@@ -7,9 +7,10 @@ import Newsletter from '../Newsletter/Newsletter'
import Popups from '../Popups/Popups'
import Prices from '../Prices/Prices'
export const links: {
[key: string]: { label: string; path: string; adminOnly?: boolean }
} = {
export const links: Record<
string,
{ label: string; path: string; adminOnly?: boolean }
> = {
newsletter: {
label: 'Newsletter',
path: '/newsletter',
......
......@@ -4,7 +4,7 @@ declare module '*.svg' {
}
declare module '*.scss' {
const styles: { [className: string]: string }
const styles: Record<string, string>
export default styles
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment