Skip to content

Commit

Permalink
feat: add import, promise, and recommended rules
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Apr 25, 2022
1 parent 33154f2 commit 3bcfedd
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
3 changes: 0 additions & 3 deletions .eslintrc.local.json

This file was deleted.

16 changes: 16 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
module.exports = {
extends: [
'eslint:recommended',
],
parserOptions: {
ecmaVersion: 2022,
ecmaFeatures: {},
Expand All @@ -10,6 +13,8 @@ module.exports = {
},
plugins: [
'node',
'import',
'promise',
],
globals: {
document: 'readonly',
Expand Down Expand Up @@ -203,5 +208,16 @@ module.exports = {
'node/no-deprecated-api': 'error',
'node/process-exit-as-throw': 'error',
'node/no-callback-literal': 'error',

// import plugin
'import/no-extraneous-dependencies': 'error',
'import/no-unresolved': 'error',
'import/no-duplicates': 'error',

// promise plugin
'promise/always-return': 'error',
'promise/no-return-wrap': 'error',
'promise/catch-or-return': 'error',
'promise/no-new-statics': 'error',
},
}
16 changes: 14 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"author": "GitHub Inc.",
"license": "ISC",
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/eslint-config": "file:./",
"@npmcli/template-oss": "3.4.1",
"tap": "^16.0.1"
},
Expand All @@ -45,6 +45,18 @@
},
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"version": "3.4.1"
"version": "3.4.1",
"allowedPackages": [
"eslint",
"eslint-plugin-node",
"eslint-plugin-import",
"eslint-plugin-promise"
]
},
"peerDependencies": {
"eslint": "^8.13.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^6.0.0"
}
}

0 comments on commit 3bcfedd

Please sign in to comment.