aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2020-02-13 21:22:55 +0300
committerValentin Popov <info@valentineus.link>2020-02-13 21:22:55 +0300
commit92c2dc54a9edac7f8d7fe00d274d42b799b33d99 (patch)
tree9ce192fee149702741ca9c111dd0734fb913a804
parent8ce6c52655256648d26f0c5cd038f9cc98f5c3ee (diff)
downloadeslint-config-92c2dc54a9edac7f8d7fe00d274d42b799b33d99.tar.xz
eslint-config-92c2dc54a9edac7f8d7fe00d274d42b799b33d99.zip
feat(config): Initial default rules
Signed-off-by: Valentin Popov <info@valentineus.link>
-rw-r--r--.eslintrc.json7
-rw-r--r--src/javascript.ts8
-rw-r--r--src/typescript.ts16
3 files changed, 23 insertions, 8 deletions
diff --git a/.eslintrc.json b/.eslintrc.json
index d8c4cb7..d8809d9 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -10,6 +10,9 @@
},
"parserOptions": {
"ecmaVersion": 2020,
- "sourceType": "module"
- }
+ "project": "./tsconfig.json",
+ "sourceType": "module",
+ "tsconfigRootDir": "."
+ },
+ "root": true
}
diff --git a/src/javascript.ts b/src/javascript.ts
index 0031bf0..6dd6ac8 100644
--- a/src/javascript.ts
+++ b/src/javascript.ts
@@ -2,7 +2,13 @@ import rDefault from "./rules/default.json";
import rImport from "./rules/import.json";
module.exports = {
- "extends": ["eslint:all"],
+ "extends": [
+ "eslint:recommended",
+ "plugin:import/errors",
+ "plugin:import/recommended",
+ "plugin:import/warnings",
+ ],
+ "plugins": ["import"],
"rules": {
...rDefault,
...rImport,
diff --git a/src/typescript.ts b/src/typescript.ts
index 5221154..b24cbed 100644
--- a/src/typescript.ts
+++ b/src/typescript.ts
@@ -2,7 +2,13 @@ import rDefault from "./rules/typescript/default.json";
import rOverrides from "./rules/typescript/overrides.json";
module.exports = {
- "extends": ["./javascript"],
+ "extends": [
+ "./javascript",
+ "plugin:@typescript-eslint/eslint-recommended",
+ "plugin:@typescript-eslint/recommended",
+ "plugin:@typescript-eslint/recommended-requiring-type-checking",
+ "plugin:import/typescript",
+ ],
"overrides": [
{
files: [
@@ -13,9 +19,9 @@ module.exports = {
},
],
"parser": "@typescript-eslint/parser",
- "parserOptions": {
- tsconfigRootDir: __dirname,
- },
- "plugins": ["@typescript-eslint"],
+ "plugins": [
+ "@typescript-eslint",
+ "import",
+ ],
"rules": { ...rDefault },
};