Skip to content

Commit

Permalink
Apply eslint-config-beslogic"3.1.1 to reduce conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel-Therrien-Beslogic committed Nov 15, 2024
1 parent 42ef3c4 commit a431a84
Show file tree
Hide file tree
Showing 24 changed files with 7,013 additions and 5,084 deletions.
27 changes: 16 additions & 11 deletions canopeum_frontend/.eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,22 @@ module.exports = {
extends: [
'beslogic/react',
'beslogic/typescript',
'beslogic/dprint',
'beslogic/extra-strict',
],
parser: '@typescript-eslint/parser',
parserOptions: {
// Experimental, but causes pre-commit to actually find the project and avoids OOM
projectService: {
allowDefaultProject: ['*/*/*.js', '.eslintrc.cjs'],
},
// Still needed for plugins that haven't updated to typescript-eslint@8 yet
// Namely: eslint-plugin-sonarjs
EXPERIMENTAL_useProjectService: true,
// eslint-disable-next-line no-undef -- false-positive
tsconfigRootDir: __dirname,
},
ignorePatterns: [
// Isn't included in any TSConfig
'.eslintrc.cjs',
'vite.config.ts',
// Not found by the project service. Isn't included in any TSConfig
'index.html',
// Auto-generated
'src/services/api.ts',
],
Expand All @@ -24,6 +29,7 @@ module.exports = {
'warn',
{ allowConstantExport: true }, // Works fine in Vite
],

/*
* Beslogic presets overrides
*/
Expand Down Expand Up @@ -66,18 +72,17 @@ module.exports = {
// will cause us to have to add classes to React Components
'react/forbid-component-props': 'off',
'@typescript-eslint/no-unsafe-member-access': 'warn',
// There is currently a bug with this rule causing the linter to crash
// Until this is fixed or solved, we'll turn this one off to prevent blocking
// in PR with the exception
// https://github.com/cartant/eslint-plugin-etc/issues/63
'etc/no-implicit-any-catch': 'off',
// Extremely slow rule
'etc/no-commented-out-code': 'off',
},
overrides: [
{
files: 'src/locale/**/*.ts',
rules: {
// These are not credentials
'sonarjs/no-hardcoded-credentials': 'off',
// We prefer avoiding line-breaks in translation files
'max-len': 'off',
'@stylistic/max-len': 'off',
// Imports across languages to use the "satisfies" keyword on object literals
// We need to apply it directly on object literals to check for excess properties
// https://www.typescriptlang.org/docs/handbook/2/objects.html#excess-property-checks
Expand Down
Loading

0 comments on commit a431a84

Please sign in to comment.