Skip to content

Commit 0874a24

Browse files
authored
Merge pull request #19 from aboutbits/eslint-all-files
Lint all relevant files
2 parents cacf5fe + 9d8f40d commit 0874a24

5 files changed

Lines changed: 52 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: 36 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,37 @@
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": ["@typescript-eslint", "jest", "import"],
8+
"extends": [
9+
"plugin:@typescript-eslint/recommended",
10+
"plugin:import/typescript",
11+
"plugin:prettier/recommended"
12+
],
13+
"parserOptions": {
14+
"sourceType": "module",
15+
"ecmaVersion": 2018
16+
},
17+
"rules": {
18+
"import/namespace": "off",
19+
"import/order": ["error"],
20+
"no-unused-vars": "off",
21+
"@typescript-eslint/no-unused-vars": "error",
22+
"@typescript-eslint/member-delimiter-style": "off",
23+
"@typescript-eslint/explicit-function-return-type": "off",
24+
"@typescript-eslint/no-var-requires": "off",
25+
"@typescript-eslint/no-extra-semi": "off",
26+
"@typescript-eslint/no-explicit-any": "off"
27+
},
28+
"overrides": [
29+
{
30+
// enable the rule specifically for TypeScript files
31+
"files": ["*.ts", "*.tsx"],
32+
"rules": {
33+
"@typescript-eslint/explicit-function-return-type": ["error"]
34+
}
35+
}
36+
]
37+
}

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)