diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..c925c21d5 --- /dev/null +++ b/.eslintignore @@ -0,0 +1,2 @@ +/dist +/node_modules diff --git a/.eslintrc.json b/.eslintrc.json index a9d76302a..b52bb1f7a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,50 +1,37 @@ { - "parser": "@typescript-eslint/parser", - "env": { - "browser": true, - "node": true - }, - "plugins": [ - "prettier", - "@typescript-eslint", - "jest", - "import" - ], - "extends": [ - "prettier", - "plugin:prettier/recommended", - "plugin:@typescript-eslint/recommended", - "plugin:import/typescript" - ], - "parserOptions": { - "sourceType": "module", - "ecmaVersion": 2018 - }, - "rules": { - "import/namespace": "off", - "import/order": [ - "error" - ], - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/member-delimiter-style": "off", - "@typescript-eslint/explicit-function-return-type": "off", - "@typescript-eslint/no-var-requires": "off", - "@typescript-eslint/no-extra-semi": "off", - "@typescript-eslint/no-explicit-any": "off" - }, - "overrides": [ - { - // enable the rule specifically for TypeScript files - "files": [ - "*.ts", - "*.tsx" - ], - "rules": { - "@typescript-eslint/explicit-function-return-type": [ - "error" - ] - } - } - ] -} \ No newline at end of file + "parser": "@typescript-eslint/parser", + "env": { + "browser": true, + "node": true + }, + "plugins": ["@typescript-eslint", "jest", "import"], + "extends": [ + "plugin:@typescript-eslint/recommended", + "plugin:import/typescript", + "plugin:prettier/recommended" + ], + "parserOptions": { + "sourceType": "module", + "ecmaVersion": 2018 + }, + "rules": { + "import/namespace": "off", + "import/order": ["error"], + "no-unused-vars": "off", + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/member-delimiter-style": "off", + "@typescript-eslint/explicit-function-return-type": "off", + "@typescript-eslint/no-var-requires": "off", + "@typescript-eslint/no-extra-semi": "off", + "@typescript-eslint/no-explicit-any": "off" + }, + "overrides": [ + { + // enable the rule specifically for TypeScript files + "files": ["*.ts", "*.tsx"], + "rules": { + "@typescript-eslint/explicit-function-return-type": ["error"] + } + } + ] +} diff --git a/jestconfig.json b/jestconfig.json index eb79f0bd1..db95203eb 100644 --- a/jestconfig.json +++ b/jestconfig.json @@ -5,4 +5,4 @@ }, "testRegex": "(/__tests?__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"] -} \ No newline at end of file +} diff --git a/package.json b/package.json index 58b6369f1..2e32d8b79 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "build": "tsc", "clear": "rm -rf src/*", "generate": "node generator.js", - "lint": "eslint --cache --ext js,ts,tsx src ./generator.js", + "lint": "eslint --cache --ext js,ts,tsx,json .", "lint:fix": "npm run lint -- --cache --fix", "typecheck": "tsc --noEmit", "test": "jest --config jestconfig.json --passWithNoTests", @@ -20,7 +20,11 @@ "version": "npm run test && npm run lint && git add -A src", "postversion": "git push && git push --tags" }, - "keywords": ["material design", "icons", "react"], + "keywords": [ + "material design", + "icons", + "react" + ], "private": false, "author": "AboutBits", "license": "MIT", @@ -28,7 +32,10 @@ "type": "git", "url": "git+https://github.com/aboutbits/react-material-icons" }, - "files": ["readme.md", "dist/**/*"], + "files": [ + "readme.md", + "dist/**/*" + ], "publishConfig": { "access": "public" }, diff --git a/tsconfig.json b/tsconfig.json index 6e6ec4a4c..0ced7aced 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,12 +10,6 @@ "strict": true, "sourceMap": false }, - "include": [ - "src" - ], - "exclude": [ - "node_modules", - "**/__test__/*", - "**/__tests__/*" - ] -} \ No newline at end of file + "include": ["src"], + "exclude": ["node_modules", "**/__test__/*", "**/__tests__/*"] +}