Skip to content

Commit

Permalink
Add eslint rule from airbnb to ensure correct deps #93 #90
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed Jan 29, 2021
1 parent 70856ae commit 0612b8e
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Selectively include rules from airbnb https://github.com/transloadit/node-sdk/issues/90
// eslint-disable-next-line import/no-extraneous-dependencies
const airbnbRulesImports = require('eslint-config-airbnb-base/rules/imports').rules

module.exports = {
extends: 'standard',
env : {
Expand All @@ -6,8 +10,10 @@ module.exports = {
node: true,
},
rules: {
'no-multi-spaces': 0,
'comma-dangle' : [
// See https://github.com/transloadit/node-sdk/issues/93
'import/no-extraneous-dependencies': airbnbRulesImports['import/no-extraneous-dependencies'],
'no-multi-spaces' : 0,
'comma-dangle' : [
'error',
'always-multiline',
],
Expand Down
3 changes: 3 additions & 0 deletions examples/retry.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
// yarn add p-retry
//
// Run this file as:
//
// env TRANSLOADIT_KEY=xxx TRANSLOADIT_SECRET=yyy node retry.js
//

// eslint-disable-next-line import/no-extraneous-dependencies
const pRetry = require('p-retry')

// You'll likely just want to `require('transloadit')`, but we're requiring the local
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"@types/jest": "^26.0.19",
"badge-maker": "^3.3.0",
"eslint": "^7.18.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-node": "^11.1.0",
Expand Down
24 changes: 24 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1330,6 +1330,11 @@ configstore@^5.0.1:
write-file-atomic "^3.0.0"
xdg-basedir "^4.0.0"

confusing-browser-globals@^1.0.10:
version "1.0.10"
resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59"
integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA==

contains-path@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/contains-path/-/contains-path-0.1.0.tgz#fe8cf184ff6670b6baef01a9d4861a5cbec4120a"
Expand Down Expand Up @@ -1695,6 +1700,15 @@ escodegen@^1.14.1:
optionalDependencies:
source-map "~0.6.1"

eslint-config-airbnb-base@^14.2.1:
version "14.2.1"
resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-14.2.1.tgz#8a2eb38455dc5a312550193b319cdaeef042cd1e"
integrity sha512-GOrQyDtVEc1Xy20U7vsB2yAoB4nBlfH5HZJeatRXHleO+OS5Ot+MWij4Dpltw4/DyIkqUfqz1epfhVR5XWWQPA==
dependencies:
confusing-browser-globals "^1.0.10"
object.assign "^4.1.2"
object.entries "^1.1.2"

eslint-config-standard@^16.0.2:
version "16.0.2"
resolved "https://registry.yarnpkg.com/eslint-config-standard/-/eslint-config-standard-16.0.2.tgz#71e91727ac7a203782d0a5ca4d1c462d14e234f6"
Expand Down Expand Up @@ -3853,6 +3867,16 @@ object.assign@^4.1.2:
has-symbols "^1.0.1"
object-keys "^1.1.1"

object.entries@^1.1.2:
version "1.1.3"
resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.1.3.tgz#c601c7f168b62374541a07ddbd3e2d5e4f7711a6"
integrity sha512-ym7h7OZebNS96hn5IJeyUmaWhaSM4SVtAPPfNLQEI2MYWCO2egsITb9nab2+i/Pwibx+R0mtn+ltKJXRSeTMGg==
dependencies:
call-bind "^1.0.0"
define-properties "^1.1.3"
es-abstract "^1.18.0-next.1"
has "^1.0.3"

object.pick@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
Expand Down

0 comments on commit 0612b8e

Please sign in to comment.