Skip to content

Commit

Permalink
CCM-5848: Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
m-salaudeen committed Jul 30, 2024
1 parent 2c35c51 commit 92316c8
Show file tree
Hide file tree
Showing 7 changed files with 947 additions and 3 deletions.
71 changes: 70 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,72 @@
{
"extends": "next/core-web-vitals"
"extends": [
"airbnb",
"eslint:recommended",
"next",
"next/core-web-vitals",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:jsx-a11y/recommended",
"plugin:prettier/recommended",
"plugin:react-hooks/recommended",
"plugin:react/recommended",
"plugin:security/recommended-legacy",
"plugin:sonarjs/recommended-legacy",
"plugin:unicorn/recommended"
],
"plugins": [
"@typescript-eslint",
"html",
"import",
"jest",
"jsx-a11y",
"prettier",
"react",
"react-hooks",
"security",
"sonarjs",
"unicorn"
],
"rules": {
"react/display-name": "off",
"no-restricted-syntax": "off",
"consistent-return": "off",
"prettier/prettier": "error",
"unicorn/prevent-abbreviations": "off",
"unicorn/filename-case": [
"error", {
"case": "kebabCase",
"ignore": [
".tsx"
]
}
],
"react/react-in-jsx-scope": "off",
"react/jsx-filename-extension": "off",
"react/jsx-props-no-spreading": "off",
"react/function-component-definition": "off",
"react/jsx-no-useless-fragment": ["error", { "allowExpressions": true }],
"import/prefer-default-export": "off",
"import/extensions": "off",
"no-shadow": "off",
"@typescript-eslint/no-shadow": "error",
"@typescript-eslint/no-unused-vars": [
"error",
{
"ignoreRestSiblings": true,
"argsIgnorePattern": "^_",
"varsIgnorePattern": "^_"
}
],
"security/detect-object-injection": "off",
"sonarjs/no-duplicate-string": "off",
"react/no-danger": "off",
"no-param-reassign": "off",
"react/require-default-props": "off"
},
"settings": {
"import/resolver": {
"typescript": {} // this loads <rootdir>/tsconfig.json to eslint
}
}
}
12 changes: 12 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.next
.cache
package-lock.json
public
node_modules
next-env.d.ts
next.config.ts
.github
docs
infrastructure
scripts
.swc
12 changes: 12 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"trailingComma": "es5",
"semi": true,
"tabWidth": 2,
"singleQuote": true,
"jsxSingleQuote": true,
"quoteProps": "as-needed",
"arrowParens": "always",
"bracketSpacing": true,
"endOfLine": "lf",
"printWidth": 80
}
3 changes: 3 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
terraform 1.7.0
pre-commit 3.6.0
tfsec 1.28.6
nodejs 20.13.1
gitleaks 8.15.3
direnv 2.32.1
# ==============================================================================
# The section below is reserved for Docker image versions.

Expand Down
Loading

0 comments on commit 92316c8

Please sign in to comment.