Skip to content

Commit

Permalink
chore: use eslint plugin for preventing externals/builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
tjenkinson committed May 5, 2023
1 parent d0a105e commit 199419d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 28 deletions.
27 changes: 27 additions & 0 deletions .eslintrc.local.js
@@ -0,0 +1,27 @@
'use strict'

module.exports = {
plugins: ['import'],
rules: {
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: false,
optionalDependencies: false,
peerDependencies: false,
bundledDependencies: false,
includeInternal: true,
},
],
'import/no-nodejs-modules': ['error'],
},
overrides: [
{
files: ['**/test/**', '.eslintrc.js', '.eslintrc.local.js'],
rules: {
'import/no-extraneous-dependencies': 0,
'import/no-nodejs-modules': 0,
},
},
],
}
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -33,4 +33,3 @@
!/SECURITY.md
!/tap-snapshots/
!/test/
!/rollup.config.js
6 changes: 2 additions & 4 deletions package.json
Expand Up @@ -4,9 +4,8 @@
"description": "The semantic version parser used by npm.",
"main": "index.js",
"scripts": {
"test": "tap && npm run check-self-contained",
"test": "tap",
"snap": "tap",
"check-self-contained": "rollup -c --silent > /dev/null",
"lint": "eslint \"**/*.js\"",
"postlint": "template-oss-check",
"lintfix": "npm run lint -- --fix",
Expand All @@ -16,8 +15,7 @@
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.14.1",
"@rollup/plugin-commonjs": "^24.1.0",
"rollup": "^3.21.5",
"eslint-plugin-import": "^2.27.5",
"tap": "^16.0.0"
},
"license": "ISC",
Expand Down
22 changes: 0 additions & 22 deletions rollup.config.js

This file was deleted.

1 change: 0 additions & 1 deletion test/map.js
Expand Up @@ -11,7 +11,6 @@ const ignore = [
'tap-snapshots',
'test',
'fixtures',
'rollup.config.js',
]

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

0 comments on commit 199419d

Please sign in to comment.