@loopback/eslint-config
Advanced tools
Comparing version 1.0.0-3 to 1.1.0
@@ -6,2 +6,14 @@ # Change Log | ||
# [1.1.0](https://github.com/strongloop/loopback-next/compare/@loopback/eslint-config@1.0.0-3...@loopback/eslint-config@1.1.0) (2019-06-03) | ||
### Features | ||
* replace tslint with eslint ([44185a7](https://github.com/strongloop/loopback-next/commit/44185a7)) | ||
* **eslint-config:** allow detection of tsconfig file ([5c16db6](https://github.com/strongloop/loopback-next/commit/5c16db6)) | ||
# [1.0.0-3](https://github.com/strongloop/loopback-next/compare/@loopback/eslint-config@1.0.0-2...@loopback/eslint-config@1.0.0-3) (2019-05-31) | ||
@@ -8,0 +20,0 @@ |
@@ -6,2 +6,4 @@ // Copyright IBM Corp. 2019. All Rights Reserved. | ||
const fs = require('fs'); | ||
/** | ||
@@ -25,3 +27,8 @@ * Default ESLint configuration for LoopBack | ||
sourceType: 'module', | ||
project: './tsconfig.json', | ||
/* | ||
* The `project` setting is required for `@typescript-eslint/await-thenable` | ||
* but it causes significant performance overhead (1m13s vs 13s) | ||
* See https://github.com/typescript-eslint/typescript-eslint/issues/389 | ||
*/ | ||
project: getProjectFile(), | ||
ecmaFeatures: { | ||
@@ -43,2 +50,3 @@ ecmaVersion: 2017, | ||
rules: { | ||
'prefer-const': 'error', | ||
'no-mixed-operators': 'off', | ||
@@ -60,3 +68,2 @@ 'no-console': 'off', | ||
'@typescript-eslint/indent': 'off', | ||
// '@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
@@ -72,3 +79,2 @@ '@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-namespace': 'off', | ||
// '@typescript-eslint/no-unused-vars': 'off', | ||
'@typescript-eslint/ban-types': 'off', | ||
@@ -86,3 +92,3 @@ '@typescript-eslint/no-triple-slash-reference': 'off', | ||
'@typescript-eslint/unified-signatures': 'error', // tslint:unified-signatures | ||
'@typescript-eslint/no-explicit-any': 'error', // tslint:no-explicit-any | ||
'@typescript-eslint/no-explicit-any': 'error', // tslint:no-any | ||
@@ -104,2 +110,17 @@ 'no-unused-labels': 'error', // tslint:label-position | ||
args: 'none', // none - do not check arguments | ||
/* | ||
* The following is a workaround to the issue that parameter decorators | ||
* are treated as `unused-vars`. | ||
* | ||
* See https://github.com/typescript-eslint/typescript-eslint/issues/571 | ||
* | ||
* @example | ||
* ```ts | ||
* import {inject} from '@loopback/context'; | ||
* class MyController { | ||
* constructor(@inject('foo') foo: string) {} | ||
* } | ||
* ``` | ||
*/ | ||
varsIgnorePattern: 'inject|(\\w+)Bindings', | ||
ignoreRestSiblings: false, | ||
@@ -121,1 +142,10 @@ }, | ||
}; | ||
/** | ||
* Detect tsconfig file | ||
*/ | ||
function getProjectFile() { | ||
if (fs.existsSync('./tsconfig.build.json')) return './tsconfig.build.json'; | ||
if (fs.existsSync('./tsconfig.json')) return './tsconfig.json'; | ||
return undefined; | ||
} |
{ | ||
"name": "@loopback/eslint-config", | ||
"version": "1.0.0-3", | ||
"version": "1.1.0", | ||
"description": "Shared configuration for ESLint", | ||
@@ -27,3 +27,3 @@ "engines": { | ||
}, | ||
"gitHead": "892a031168f092d86e1323e728521870bf908b34" | ||
"gitHead": "52f1ee3e880c58aa6414de41e2430aae77425c75" | ||
} |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
9205
132
1
1