Skip to content

Commit 4451873

Browse files
5.1.0 Adicionando novas regras de lint (#20)
* 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]>
1 parent 36e4c6a commit 4451873

File tree

5 files changed

+40
-6
lines changed

5 files changed

+40
-6
lines changed

base.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module.exports = {
1111
sourceType: 'module',
1212
},
1313
rules: {
14+
'comma-dangle': off,
1415
strict: 0,
1516
'no-underscore-dangle': [0, {
1617
'allowAfterThis': true

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eslint-config-getninjas",
3-
"version": "5.0.0",
3+
"version": "5.1.0",
44
"description": "GetNinjas eslint config",
55
"main": "index.js",
66
"repository": {
@@ -18,8 +18,8 @@
1818
"url": "https://github.com/getninjas/eslint-config-getninjas/issues"
1919
},
2020
"homepage": "https://github.com/getninjas/eslint-config-getninjas#readme",
21-
"peerDependencies": {
22-
"eslint": "8.0.1",
21+
"dependencies": {
22+
"eslint": "8.21.0",
2323
"eslint-plugin-react": "7.30.1",
2424
"eslint-config-prettier": "8.5.0",
2525
"eslint-plugin-prettier": "4.2.1",

react-typescript.js

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,47 @@ module.exports = {
1111
],
1212
overrides: [
1313
],
14+
parser: "@typescript-eslint/parser",
1415
parserOptions: {
16+
project: "tsconfig.json",
1517
ecmaVersion: 'latest',
1618
sourceType: 'module'
1719
},
1820
plugins: [
1921
'react'
2022
],
2123
rules: {
22-
"react/no-unescaped-entities": "off",
2324
"@next/next/no-page-custom-font": "off",
24-
"import/no-anonymous-default-export": "off"
25-
}
25+
"import/no-anonymous-default-export": "off",
26+
"comma-dangle": "off",
27+
"prettier/prettier": "error",
28+
"@typescript-eslint/dot-notation": "warn",
29+
"@typescript-eslint/explicit-function-return-type": "off",
30+
"@typescript-eslint/member-delimiter-style": "off",
31+
"import/prefer-default-export": "off",
32+
"import/extensions": "off",
33+
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
34+
"global-require": "off",
35+
"no-param-reassign": "off",
36+
"no-underscore-dangle": "off",
37+
"camelcase": "off",
38+
"no-console": ["error", { "allow": ["tron"] }],
39+
"import/no-extraneous-dependencies": "off",
40+
"no-use-before-define": "off",
41+
"@typescript-eslint/no-use-before-define": ["error"],
42+
"@typescript-eslint/explicit-module-boundary-types": "off",
43+
"@typescript-eslint/indent": "off",
44+
"@typescript-eslint/space-before-function-paren": "off",
45+
"@typescript-eslint/semi": "off",
46+
"@typescript-eslint/strict-boolean-expressions": "off",
47+
"@typescript-eslint/restrict-template-expressions": "off",
48+
"@typescript-eslint/prefer-nullish-coalescing": "off",
49+
"import/no-duplicates": "off",
50+
"multiline-ternary": "off"
51+
},
52+
settings: {
53+
react: {
54+
version: 'detect',
55+
},
56+
},
2657
}

react.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,6 @@ module.exports = {
2828
'react/jsx-no-bind': 'off',
2929
'react/jsx-props-no-spreading': 'off',
3030
'no-underscore-dangle': ['error', { allow: ['_links'] }],
31+
'comma-dangle': off,
3132
},
3233
};

typescript.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ module.exports = {
1111
sourceType: 'module'
1212
},
1313
rules: {
14+
'comma-dangle': off,
1415
'prettier/prettier': ['error', {}, { usePrettierrc: true }],
1516
'import/extensions': [
1617
'error',

0 commit comments

Comments
 (0)