Skip to content

Commit 199419d

Browse files
committed
chore: use eslint plugin for preventing externals/builtins
1 parent d0a105e commit 199419d

File tree

5 files changed

+29
-28
lines changed

5 files changed

+29
-28
lines changed

.eslintrc.local.js

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
'use strict'
2+
3+
module.exports = {
4+
plugins: ['import'],
5+
rules: {
6+
'import/no-extraneous-dependencies': [
7+
'error',
8+
{
9+
devDependencies: false,
10+
optionalDependencies: false,
11+
peerDependencies: false,
12+
bundledDependencies: false,
13+
includeInternal: true,
14+
},
15+
],
16+
'import/no-nodejs-modules': ['error'],
17+
},
18+
overrides: [
19+
{
20+
files: ['**/test/**', '.eslintrc.js', '.eslintrc.local.js'],
21+
rules: {
22+
'import/no-extraneous-dependencies': 0,
23+
'import/no-nodejs-modules': 0,
24+
},
25+
},
26+
],
27+
}

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,3 @@
3333
!/SECURITY.md
3434
!/tap-snapshots/
3535
!/test/
36-
!/rollup.config.js

package.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
"description": "The semantic version parser used by npm.",
55
"main": "index.js",
66
"scripts": {
7-
"test": "tap && npm run check-self-contained",
7+
"test": "tap",
88
"snap": "tap",
9-
"check-self-contained": "rollup -c --silent > /dev/null",
109
"lint": "eslint \"**/*.js\"",
1110
"postlint": "template-oss-check",
1211
"lintfix": "npm run lint -- --fix",
@@ -16,8 +15,7 @@
1615
"devDependencies": {
1716
"@npmcli/eslint-config": "^4.0.0",
1817
"@npmcli/template-oss": "4.14.1",
19-
"@rollup/plugin-commonjs": "^24.1.0",
20-
"rollup": "^3.21.5",
18+
"eslint-plugin-import": "^2.27.5",
2119
"tap": "^16.0.0"
2220
},
2321
"license": "ISC",

rollup.config.js

-22
This file was deleted.

test/map.js

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ const ignore = [
1111
'tap-snapshots',
1212
'test',
1313
'fixtures',
14-
'rollup.config.js',
1514
]
1615

1716
const { statSync, readdirSync } = require('fs')

0 commit comments

Comments
 (0)