Skip to content

Commit 8d957e1

Browse files
committed
feature: @putout/plugin-eslint: remove-parser-options: exclude typescript options
1 parent 1f57e99 commit 8d957e1

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const options = {
2+
languageOptions: {
3+
parserOptions: {
4+
warnOnUnsupportedTypeScriptVersion,
5+
ecmaFeatures: {
6+
jsx: true,
7+
},
8+
}
9+
}
10+
};

packages/plugin-eslint/lib/remove-parser-options/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ module.exports.traverse = ({push}) => ({
2525
return;
2626

2727
const [babelOptionsPath] = traverseProperties(parserOptionsPath, 'babelOptions');
28+
const [ecmaFeatures] = traverseProperties(parserOptionsPath, 'ecmaFeatures');
2829

29-
if (babelOptionsPath)
30+
if (ecmaFeatures || babelOptionsPath)
3031
return;
3132

3233
push(parserOptionsPath);

packages/plugin-eslint/lib/remove-parser-options/index.spec.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,8 @@ test('eslint: remove-parser-options: no report: babel-options', (t) => {
2828
t.noReport('babel-options');
2929
t.end();
3030
});
31+
32+
test('eslint: remove-parser-options: no report: typescript-options', (t) => {
33+
t.noReport('typescript-options');
34+
t.end();
35+
});

0 commit comments

Comments
 (0)