eslint-config-pv
Advanced tools
Comparing version 2.2.2 to 2.3.0
@@ -0,1 +1,9 @@ | ||
# 2.3.0 | ||
- Added: typescript rule set to be used with @typescript-eslint | ||
- Changed: pretier rules | ||
- Changed: `"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]` | ||
- Changed: `"@typescript-eslint/no-non-null-assertion": "off"` | ||
- Updated: `ecmaVersion` to 2020 | ||
# 2.1.1 | ||
@@ -2,0 +10,0 @@ |
@@ -10,3 +10,3 @@ module.exports = { | ||
parserOptions: { | ||
ecmaVersion: 2017, | ||
ecmaVersion: 2020, | ||
sourceType: "module", | ||
@@ -13,0 +13,0 @@ ecmaFeatures: { |
{ | ||
"name": "eslint-config-pv", | ||
"version": "2.2.2", | ||
"version": "2.3.0", | ||
"description": "pro!vision ESLint configuration. Can be adapted and adjusted in each project.", | ||
@@ -11,2 +11,6 @@ "author": { | ||
{ | ||
"name": "Mehran Behzad", | ||
"email": "mbehzad@pro-vision.de" | ||
}, | ||
{ | ||
"name": "Ingo Fahrentholz", | ||
@@ -18,10 +22,2 @@ "email": "ifahrentholz@pro-vision.de" | ||
"email": "dding@pro-vision.de" | ||
}, | ||
{ | ||
"name": "Fritz Stelluto", | ||
"email": "fstelluto@pro-vision.de" | ||
}, | ||
{ | ||
"name": "Matthias Hauch", | ||
"email": "mhauch@pro-vision.de" | ||
} | ||
@@ -59,10 +55,11 @@ ], | ||
"devDependencies": { | ||
"eslint": "6.2.1", | ||
"eslint-config-prettier": "6.1.0", | ||
"eslint-plugin-import": "2.18.2", | ||
"eslint-plugin-prettier": "3.1.0", | ||
"jest": "24.9.0", | ||
"prettier": "1.18.2" | ||
"@types/node": "13.9.0", | ||
"eslint": "6.8.0", | ||
"eslint-config-prettier": "6.10.0", | ||
"eslint-plugin-import": "2.20.1", | ||
"eslint-plugin-prettier": "3.1.2", | ||
"jest": "25.1.0", | ||
"prettier": "1.19.1" | ||
}, | ||
"dependencies": {} | ||
} |
module.exports = { | ||
extends: [ | ||
"prettier" | ||
// Turns off all rules that are unnecessary or might conflict with Prettier, | ||
// lints code which is formated different than prettier rules | ||
"plugin:prettier/recommended", | ||
// disable any potential @typescript-eslint rules relating to code formatting | ||
"prettier/@typescript-eslint", | ||
] | ||
}; |
@@ -21,3 +21,3 @@ # eslint-config-pv | ||
We export three ESLint configurations for usage in projects. | ||
We export four ESLint configurations for usage in projects. | ||
@@ -76,2 +76,36 @@ | ||
### eslint-config-pv/typescript | ||
You need to install additional @typescript-eslint plugins (>=v2.19): | ||
```bash | ||
npm install --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin | ||
``` | ||
This allows you to eslint your tylescript files | ||
``` | ||
{ | ||
"extends": [ | ||
"pv/typescript", | ||
// "pv/prettier" // in case you are using prettier as well | ||
] | ||
} | ||
``` | ||
`pv/prettier` assumes your `tsconfig.json` file is in the same directory as where you call eslint. For example your projects root directory. But you can also specify this with: | ||
``` | ||
{ | ||
"extends": [ | ||
"pv/typescript", | ||
] | ||
parserOptions: { | ||
project: "./my-tsconfig.json", | ||
tsconfigRootDir: "my-configs/", | ||
}, | ||
} | ||
``` | ||
## WebStorm Integration | ||
@@ -78,0 +112,0 @@ Ensure you are using `node >= 4.5` and you have installed `eslint` and `eslint-plugin-import` globally: |
@@ -493,3 +493,5 @@ module.exports = { | ||
// disallow declaration of variables that are not used in the code | ||
"no-unused-vars": ["error"], | ||
// allow unused arguments to be prefixed with'_' | ||
// e.g. `.addEventListener(_e => ...)` when argument is passed during invokation but not used in the method's body | ||
"no-unused-vars": ["error", { "argsIgnorePattern": "^_" }], | ||
@@ -496,0 +498,0 @@ // disallow use of variables before they are defined |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
56834
22
869
127
7