neutrinojs-typescript-eslint
Advanced tools
Comparing version
const typescriptEslintConverter = require('typescript-eslint-converter'); | ||
const applyNeutrinoPatches = require('neutrino-patch'); | ||
module.exports = ({ | ||
typescriptFiles = ['*.ts', '*.tsx'], | ||
} = {}) => (neutrino) => { | ||
module.exports = (converterOptions) => (neutrino) => { | ||
applyNeutrinoPatches(neutrino); | ||
@@ -15,3 +13,3 @@ | ||
return typescriptEslintConverter(options, { | ||
typescriptFiles, | ||
...converterOptions, | ||
resolveExtensions: neutrino.options.extensions, | ||
@@ -18,0 +16,0 @@ autoParseResolvableExtensions: true, |
{ | ||
"name": "neutrinojs-typescript-eslint", | ||
"version": "1.3.0", | ||
"version": "1.3.1", | ||
"description": "Typescript ESLint integration for neutrino projects", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -58,2 +58,23 @@ # Neutrino Typescript ESLint | ||
## Options | ||
```javascript | ||
// default values shown | ||
typescriptLint({ | ||
// file patterns where TypeScript rules are applied | ||
typescriptFiles: ['*.ts', '*.tsx'], | ||
// add "plugin:@typescript-eslint/recommended" | ||
recommended: true, | ||
// convert "indent" to "@typescript-eslint/indent" | ||
indent: false, | ||
}) | ||
``` | ||
Note that `indent` is `false` by default due to | ||
[known issues with @typescript-eslint/indent](https://github.com/typescript-eslint/typescript-eslint/issues/1824). | ||
Any unrecognised options are passed through to `typescript-eslint-converter`. | ||
## Automatic rule conversion | ||
@@ -60,0 +81,0 @@ |
4693
12.6%85
32.81%15
-11.76%