Skip to content

Commit

Permalink
use eslint-config-{jest-files,unicorn-camelcase}
Browse files Browse the repository at this point in the history
  • Loading branch information
timche committed May 3, 2018
1 parent e0b9c71 commit 3d815b3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 15 deletions.
20 changes: 5 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.1",
"cross-env": "^2.0.0",
"eslint-config-jest-files": "^0.1.1",
"eslint-config-unicorn-camelcase": "^0.1.1",
"eslint-plugin-prettier": "^2.6.0",
"flux-standard-action": "^1.0.0",
"husky": "^0.14.3",
Expand All @@ -69,21 +71,9 @@
"xo": {
"prettier": true,
"space": true,
"rules": {
"unicorn/filename-case": [
"error",
{
"case": "camelCase"
}
]
},
"overrides": [
{
"files": "test/**/*.js",
"env": [
"jest"
]
}
"extends": [
"unicorn-camelcase",
"jest-files"
]
},
"prettier": {
Expand Down
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2107,12 +2107,20 @@ eslint-ast-utils@^1.0.0:
lodash.get "^4.4.2"
lodash.zip "^4.2.0"

eslint-config-jest-files@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/eslint-config-jest-files/-/eslint-config-jest-files-0.1.1.tgz#79c371bf9a1eba25bafa80c7b81b50155558d057"

eslint-config-prettier@^2.9.0:
version "2.9.0"
resolved "https://registry.yarnpkg.com/eslint-config-prettier/-/eslint-config-prettier-2.9.0.tgz#5ecd65174d486c22dff389fe036febf502d468a3"
dependencies:
get-stdin "^5.0.1"

eslint-config-unicorn-camelcase@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/eslint-config-unicorn-camelcase/-/eslint-config-unicorn-camelcase-0.1.1.tgz#f35697aaac88c90930185d8aa88cadb8be260914"

eslint-config-xo@^0.20.0:
version "0.20.1"
resolved "https://registry.yarnpkg.com/eslint-config-xo/-/eslint-config-xo-0.20.1.tgz#ad04db35e62bacedcf7b7e8a76388364a78d616d"
Expand Down

6 comments on commit 3d815b3

@JaKXz
Copy link
Contributor

@JaKXz JaKXz commented on 3d815b3 May 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timche will this work for the file glob specific overrides? Unless I'm reading this wrong I think this just adds env: ["jest"] to the rules for all files

@timche
Copy link
Member Author

@timche timche commented on 3d815b3 May 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JaKXz
Copy link
Contributor

@JaKXz JaKXz commented on 3d815b3 May 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see - then the name eslint-config is a little misleading since it's specific to xo right? Or does eslint actually have that feature?

@JaKXz
Copy link
Contributor

@JaKXz JaKXz commented on 3d815b3 May 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for asking such basic questions, I'm on the move rn, but I just got to check the eslint docs on it. I will publish the eslint-config-typescript - do you think I should keep the extensions key in the flux-standard-action package.json or in the eslint-config?

@timche
Copy link
Member Author

@timche timche commented on 3d815b3 May 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timche
Copy link
Member Author

@timche timche commented on 3d815b3 May 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

extensions is a xo feature, so I'd keep it.

Please sign in to comment.