Skip to content

Commit

Permalink
Merge pull request eclipse-sw360#330 from eclipse-sw360/fix/code_linting
Browse files Browse the repository at this point in the history
feat: Add strict rule checking
  • Loading branch information
heliocastro authored Sep 24, 2024
2 parents 9b5f387 + 2eac4b7 commit f9f39cd
Show file tree
Hide file tree
Showing 6 changed files with 249 additions and 344 deletions.
73 changes: 40 additions & 33 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
{
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
//"plugin:@typescript-eslint/recommended-requiring-type-checking",
"next",
"prettier"
],
"settings": {
"next": {
"rootDir": "src"
},
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": "tsconfig.json"
}
}

},
"plugins": ["@typescript-eslint", "react", "import"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": true,
"tsconfigRootDir": "__dirname",
"ecmaFeatures": {
"jsx": true
}
"settings": {
"next": {
"rootDir": "src"
},
"rules": {
"@typescript-eslint/no-explicit-any": ["warn", { "fixToUnknown": true }],
"@typescript-eslint/no-unused-vars": ["error"],
"@typescript-eslint/ban-ts-comment": ["error", { "ts-expect-error": "allow-with-description" }]
},
"root": true
"import/resolver": {
"typescript": {
"alwaysTryTypes": true,
"project": "tsconfig.json"
}
}
},
"plugins": ["@typescript-eslint", "react", "import"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./tsconfig.json",
"ecmaFeatures": {
"jsx": true
}
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"next",
"prettier"
],
"rules": {
"@typescript-eslint/no-explicit-any": ["warn", { "fixToUnknown": false }],
"@typescript-eslint/no-unused-vars": [
"error",
{ "vars": "all", "args": "after-used", "ignoreRestSiblings": false }
],
"@typescript-eslint/ban-ts-comment": ["error", { "ts-expect-error": "allow-with-description" }],
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/explicit-module-boundary-types": "warn",
"@typescript-eslint/no-inferrable-types": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/no-unsafe-call": "warn"
},
"root": true
}
19 changes: 10 additions & 9 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
"i18n-ally.localesPaths": ["messages"],
"i18n-ally.translate.engines": ["google"],
"i18n-ally.translate.libre.apiRoot": "http://localhost:5555",
"i18n-ally.keystyle": "nested",
"i18n-ally.sortKeys": true,
"i18n-ally.keepFulfilled": true,
"i18n-ally.indent": 2,
"i18n-ally.tabStyle": "space",
"cSpell.words": ["myprojects"]
"i18n-ally.localesPaths": ["messages"],
"i18n-ally.translate.engines": ["google"],
"i18n-ally.translate.libre.apiRoot": "http://localhost:5555",
"i18n-ally.keystyle": "nested",
"i18n-ally.sortKeys": true,
"i18n-ally.keepFulfilled": true,
"i18n-ally.indent": 2,
"i18n-ally.tabStyle": "space",
"cSpell.words": ["myprojects"],
"eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"]
}
3 changes: 3 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ const nextConfig = {
experimental: {
missingSuspenseWithCSRBailout: false,
},
typescript: {
ignoreBuildErrors: false,
},
}

module.exports = withNextIntl(nextConfig)
Loading

0 comments on commit f9f39cd

Please sign in to comment.