Skip to content

Commit 4a16f00

Browse files
committed
chore: Remove ESLint import/no-unresolved rule
Should be covered by TypeScript and has many false positives.
1 parent 3499c5d commit 4a16f00

File tree

10 files changed

+40
-43
lines changed

10 files changed

+40
-43
lines changed

.eslintrc

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,11 @@
55
"browser": true,
66
"node": true
77
},
8-
"plugins": [
9-
"compat",
10-
"import",
11-
"jsx-a11y"
12-
],
8+
"plugins": ["compat", "import", "jsx-a11y"],
139
"settings": {
1410
"import/resolver": {
1511
"node": {
16-
"extensions": [
17-
".js",
18-
".json",
19-
".ts"
20-
]
12+
"extensions": [".js", ".json", ".ts"]
2113
}
2214
},
2315
"react": {
@@ -28,22 +20,22 @@
2820
"valid-jsdoc": 0,
2921
"no-duplicate-imports": 0,
3022
"compat/compat": "error",
31-
"import/no-unresolved": ["error", {
32-
"commonjs": true,
33-
"caseSensitive": true
34-
}],
3523
"import/export": "error",
3624
"import/no-named-as-default-member": "error",
3725
"import/no-mutable-exports": "error",
3826
"import/no-amd": "error",
3927
"import/first": ["error", "absolute-first"],
4028
"import/no-duplicates": "error",
41-
"import/extensions": ["error", "always", {
42-
"js": "never",
43-
"tsx": "never",
44-
"ts": "never",
45-
"mjs": "never"
46-
}],
29+
"import/extensions": [
30+
"error",
31+
"always",
32+
{
33+
"js": "never",
34+
"tsx": "never",
35+
"ts": "never",
36+
"mjs": "never"
37+
}
38+
],
4739
"import/no-extraneous-dependencies": "error",
4840
"import/newline-after-import": "error",
4941
"import/prefer-default-export": "error",
@@ -59,10 +51,10 @@
5951
},
6052
"overrides": [
6153
{
62-
"files": ["*.spec.js"],
63-
"rules": {
64-
"compat/compat": 0
65-
}
54+
"files": ["*.spec.js"],
55+
"rules": {
56+
"compat/compat": 0
57+
}
6658
},
6759
{
6860
"files": ["*.ts", "*.tsx"],
@@ -76,9 +68,7 @@
7668
}
7769
},
7870
"plugins": ["@typescript-eslint"],
79-
"extends": [
80-
"tamia/typescript-react"
81-
]
71+
"extends": ["tamia/typescript-react"]
8272
}
8373
]
8474
}

.prettierrc

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,21 @@
44
"trailingComma": "es5",
55
"useTabs": true,
66
"proseWrap": "never",
7-
"overrides": [{
7+
"overrides": [
8+
{
89
"files": "*.md",
9-
"options": {
10-
"printWidth": 70,
11-
"useTabs": false,
12-
"semi": false,
13-
"trailingComma": "none"
14-
}
15-
}]
10+
"options": {
11+
"printWidth": 70,
12+
"useTabs": false,
13+
"semi": false,
14+
"trailingComma": "none"
15+
}
16+
},
17+
{
18+
"files": "*.{json,babelrc,eslintrc,remarkrc}",
19+
"options": {
20+
"useTabs": false
21+
}
22+
}
23+
]
1624
}

dangerfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// eslint-disable-next-line import/no-unresolved, import/extensions
1+
// eslint-disable-next-line import/extensions
22
import { danger, warn } from 'danger';
33

44
const packageChanged = danger.git.modified_files.includes('package.json');

examples/react-native/src/Root.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { Component } from 'react';
2-
// eslint-disable-next-line import/no-unresolved, import/extensions
2+
// eslint-disable-next-line import/extensions
33
import { StyleSheet, Text, ScrollView } from 'react-native';
44
import SimpleCard from './SimpleCard';
55

examples/react-native/src/SimpleCard.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, { PureComponent } from 'react';
2-
// eslint-disable-next-line import/no-unresolved, import/extensions
2+
// eslint-disable-next-line import/extensions
33
import { StyleSheet, Text, View } from 'react-native';
44
import PropTypes from 'prop-types';
55

site/docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ module.exports = {
1212
disableSwitch: true,
1313
},
1414
prism: {
15-
// eslint-disable-next-line import/no-unresolved, import/no-extraneous-dependencies
15+
// eslint-disable-next-line import/no-extraneous-dependencies
1616
theme: require('prism-react-renderer/themes/nightOwlLight'),
1717
},
1818
navbar: {

src/client/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const scrollToOrigin = () => {
3434
};
3535

3636
const render = () => {
37-
// eslint-disable-next-line @typescript-eslint/no-var-requires, import/no-unresolved
37+
// eslint-disable-next-line @typescript-eslint/no-var-requires
3838
const styleguide = require('!!../loaders/styleguide-loader!./index.js');
3939

4040
ReactDOM.render(

test/browser.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/* eslint-disable no-console */
22
/* eslint-disable import/no-extraneous-dependencies */
3-
/* eslint-disable import/no-unresolved */
43

54
const puppeteer = require('puppeteer');
65
const path = require('path');

test/run.build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable no-console, import/no-unresolved */
1+
/* eslint-disable no-console */
22

33
const styleguidist = require('../lib/scripts');
44

test/run.server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable no-console, import/no-unresolved */
1+
/* eslint-disable no-console */
22

33
const path = require('path');
44
const styleguidist = require('../lib/scripts');

0 commit comments

Comments
 (0)