Skip to content

Commit cc98d02

Browse files
authored
enable eslint on both ts and js files (#1101)
1 parent 882ed2f commit cc98d02

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

.eslintignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
/src/style/typography.js
2-
**/*.ts
3-
**/*.tsx
1+
/src/style/typography.js

.eslintrc.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
module.exports = {
22
extends: ['plugin:@typescript-eslint/recommended', 'wix/react-native', 'plugin:react-hooks/recommended'],
33
parser: '@typescript-eslint/parser',
4+
// plugins: ['@typescript-eslint'],
45
rules: {
6+
/* Disabled rules for typescript */
7+
'no-dupe-class-members': 'off',
8+
/* Other Rules */
9+
'no-unused-expressions': 'off',
510
'arrow-parens': 'off',
611
// TODO: remove after migration of legacy lifecycle methods
712
camelcase: 'off',
@@ -26,17 +31,16 @@ module.exports = {
2631
"@typescript-eslint/no-var-requires": 0,
2732
"@typescript-eslint/no-explicit-any": 0,
2833
"@typescript-eslint/member-delimiter-style": 0,
29-
// "@typescript-eslint/no-unused-vars": [2, {"args": "all", "argsIgnorePattern": "^_"}],
30-
"@typescript-eslint/no-unused-vars": 0, //todo: uncomment this line and use the the better unused rule above ^
34+
"@typescript-eslint/no-unused-vars": [2, {"args": "all", "argsIgnorePattern": "^_"}],
35+
// "@typescript-eslint/no-unused-vars": 0, //todo: uncomment this line and use the the better unused rule above ^
3136
"@typescript-eslint/no-non-null-assertion": 0,
3237
"@typescript-eslint/explicit-member-accessibility": 0,
3338
"@typescript-eslint/prefer-optional-chain": "error",
3439
"@typescript-eslint/ban-ts-ignore": 0,
3540
"@typescript-eslint/no-empty-function": 0,
3641
"@typescript-eslint/camelcase": 0,
3742
"@typescript-eslint/indent": 0
38-
},
39-
plugins: ['@typescript-eslint'],
43+
}
4044
};
4145

4246
// OLD ESlint configuration

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"pretest": "npm run lint",
2323
"test": "jest",
2424
"test:watch": "jest --watch",
25-
"lint": "eslint src -c .eslintrc.js",
25+
"lint": "eslint src -c .eslintrc.js --ext .tsx,.ts,.js",
2626
"lint:fix": "eslint src -c .eslintrc.js --fix",
2727
"lint:test": "mocha --compilers js:babel-core/register eslint-rules/tests/lib/rules",
2828
"xcode": "xed ios",

0 commit comments

Comments
 (0)