Skip to content

Commit

Permalink
5.1.0 Adicionando novas regras de lint (#20)
Browse files Browse the repository at this point in the history
* Change dependencies

* Add new rule coma-dangle

* Add new rules

* Add new lint rules

* Add new rule react-typescript

* Fix rule ts

* Update typescript.js

Co-authored-by: Danilo Trevelin <[email protected]>

* Update react.js

Co-authored-by: Danilo Trevelin <[email protected]>

* Update base.js

Co-authored-by: Danilo Trevelin <[email protected]>

Co-authored-by: Danilo Trevelin <[email protected]>
  • Loading branch information
AurinoJunior and TrevelinT authored Sep 1, 2022
1 parent 36e4c6a commit 4451873
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 6 deletions.
1 change: 1 addition & 0 deletions base.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
sourceType: 'module',
},
rules: {
'comma-dangle': off,
strict: 0,
'no-underscore-dangle': [0, {
'allowAfterThis': true
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-getninjas",
"version": "5.0.0",
"version": "5.1.0",
"description": "GetNinjas eslint config",
"main": "index.js",
"repository": {
Expand All @@ -18,8 +18,8 @@
"url": "https://github.com/getninjas/eslint-config-getninjas/issues"
},
"homepage": "https://github.com/getninjas/eslint-config-getninjas#readme",
"peerDependencies": {
"eslint": "8.0.1",
"dependencies": {
"eslint": "8.21.0",
"eslint-plugin-react": "7.30.1",
"eslint-config-prettier": "8.5.0",
"eslint-plugin-prettier": "4.2.1",
Expand Down
37 changes: 34 additions & 3 deletions react-typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,47 @@ module.exports = {
],
overrides: [
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: "tsconfig.json",
ecmaVersion: 'latest',
sourceType: 'module'
},
plugins: [
'react'
],
rules: {
"react/no-unescaped-entities": "off",
"@next/next/no-page-custom-font": "off",
"import/no-anonymous-default-export": "off"
}
"import/no-anonymous-default-export": "off",
"comma-dangle": "off",
"prettier/prettier": "error",
"@typescript-eslint/dot-notation": "warn",
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/member-delimiter-style": "off",
"import/prefer-default-export": "off",
"import/extensions": "off",
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
"global-require": "off",
"no-param-reassign": "off",
"no-underscore-dangle": "off",
"camelcase": "off",
"no-console": ["error", { "allow": ["tron"] }],
"import/no-extraneous-dependencies": "off",
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],
"@typescript-eslint/explicit-module-boundary-types": "off",
"@typescript-eslint/indent": "off",
"@typescript-eslint/space-before-function-paren": "off",
"@typescript-eslint/semi": "off",
"@typescript-eslint/strict-boolean-expressions": "off",
"@typescript-eslint/restrict-template-expressions": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"import/no-duplicates": "off",
"multiline-ternary": "off"
},
settings: {
react: {
version: 'detect',
},
},
}
1 change: 1 addition & 0 deletions react.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,6 @@ module.exports = {
'react/jsx-no-bind': 'off',
'react/jsx-props-no-spreading': 'off',
'no-underscore-dangle': ['error', { allow: ['_links'] }],
'comma-dangle': off,
},
};
1 change: 1 addition & 0 deletions typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module.exports = {
sourceType: 'module'
},
rules: {
'comma-dangle': off,
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
'import/extensions': [
'error',
Expand Down

0 comments on commit 4451873

Please sign in to comment.