Skip to content

Commit

Permalink
feat: add import, promise, and recommended rules (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys authored Jul 21, 2022
1 parent cc70a14 commit e1c01fd
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 6 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',
},
}
18 changes: 15 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"author": "GitHub Inc.",
"license": "ISC",
"devDependencies": {
"@npmcli/eslint-config": "^3.0.1",
"@npmcli/template-oss": "3.4.2",
"@npmcli/eslint-config": "file:./",
"@npmcli/template-oss": "3.4.1",
"tap": "^16.0.1"
},
"dependencies": {
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.2"
"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 e1c01fd

Please sign in to comment.