Skip to content

Commit 313d8a5

Browse files
committed
lint all releveant files
1 parent cacf5fe commit 313d8a5

5 files changed

Lines changed: 53 additions & 62 deletions

File tree

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/dist
2+
/node_modules

.eslintrc.json

Lines changed: 37 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,38 @@
11
{
2-
"parser": "@typescript-eslint/parser",
3-
"env": {
4-
"browser": true,
5-
"node": true
6-
},
7-
"plugins": [
8-
"prettier",
9-
"@typescript-eslint",
10-
"jest",
11-
"import"
12-
],
13-
"extends": [
14-
"prettier",
15-
"plugin:prettier/recommended",
16-
"plugin:@typescript-eslint/recommended",
17-
"plugin:import/typescript"
18-
],
19-
"parserOptions": {
20-
"sourceType": "module",
21-
"ecmaVersion": 2018
22-
},
23-
"rules": {
24-
"import/namespace": "off",
25-
"import/order": [
26-
"error"
27-
],
28-
"no-unused-vars": "off",
29-
"@typescript-eslint/no-unused-vars": "error",
30-
"@typescript-eslint/member-delimiter-style": "off",
31-
"@typescript-eslint/explicit-function-return-type": "off",
32-
"@typescript-eslint/no-var-requires": "off",
33-
"@typescript-eslint/no-extra-semi": "off",
34-
"@typescript-eslint/no-explicit-any": "off"
35-
},
36-
"overrides": [
37-
{
38-
// enable the rule specifically for TypeScript files
39-
"files": [
40-
"*.ts",
41-
"*.tsx"
42-
],
43-
"rules": {
44-
"@typescript-eslint/explicit-function-return-type": [
45-
"error"
46-
]
47-
}
48-
}
49-
]
50-
}
2+
"parser": "@typescript-eslint/parser",
3+
"env": {
4+
"browser": true,
5+
"node": true
6+
},
7+
"plugins": ["prettier", "@typescript-eslint", "jest", "import"],
8+
"extends": [
9+
"prettier",
10+
"plugin:prettier/recommended",
11+
"plugin:@typescript-eslint/recommended",
12+
"plugin:import/typescript"
13+
],
14+
"parserOptions": {
15+
"sourceType": "module",
16+
"ecmaVersion": 2018
17+
},
18+
"rules": {
19+
"import/namespace": "off",
20+
"import/order": ["error"],
21+
"no-unused-vars": "off",
22+
"@typescript-eslint/no-unused-vars": "error",
23+
"@typescript-eslint/member-delimiter-style": "off",
24+
"@typescript-eslint/explicit-function-return-type": "off",
25+
"@typescript-eslint/no-var-requires": "off",
26+
"@typescript-eslint/no-extra-semi": "off",
27+
"@typescript-eslint/no-explicit-any": "off"
28+
},
29+
"overrides": [
30+
{
31+
// enable the rule specifically for TypeScript files
32+
"files": ["*.ts", "*.tsx"],
33+
"rules": {
34+
"@typescript-eslint/explicit-function-return-type": ["error"]
35+
}
36+
}
37+
]
38+
}

jestconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
},
66
"testRegex": "(/__tests?__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$",
77
"moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"]
8-
}
8+
}

package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"build": "tsc",
1212
"clear": "rm -rf src/*",
1313
"generate": "node generator.js",
14-
"lint": "eslint --cache --ext js,ts,tsx src ./generator.js",
14+
"lint": "eslint --cache --ext js,ts,tsx,json .",
1515
"lint:fix": "npm run lint -- --cache --fix",
1616
"typecheck": "tsc --noEmit",
1717
"test": "jest --config jestconfig.json --passWithNoTests",
@@ -20,15 +20,22 @@
2020
"version": "npm run test && npm run lint && git add -A src",
2121
"postversion": "git push && git push --tags"
2222
},
23-
"keywords": ["material design", "icons", "react"],
23+
"keywords": [
24+
"material design",
25+
"icons",
26+
"react"
27+
],
2428
"private": false,
2529
"author": "AboutBits",
2630
"license": "MIT",
2731
"repository": {
2832
"type": "git",
2933
"url": "git+https://github.com/aboutbits/react-material-icons"
3034
},
31-
"files": ["readme.md", "dist/**/*"],
35+
"files": [
36+
"readme.md",
37+
"dist/**/*"
38+
],
3239
"publishConfig": {
3340
"access": "public"
3441
},

tsconfig.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
"strict": true,
1111
"sourceMap": false
1212
},
13-
"include": [
14-
"src"
15-
],
16-
"exclude": [
17-
"node_modules",
18-
"**/__test__/*",
19-
"**/__tests__/*"
20-
]
21-
}
13+
"include": ["src"],
14+
"exclude": ["node_modules", "**/__test__/*", "**/__tests__/*"]
15+
}

0 commit comments

Comments
 (0)