Skip to content

Commit

Permalink
chore: upgrade devDependencies and simplify eslint config
Browse files Browse the repository at this point in the history
  • Loading branch information
iiroj authored and okonet committed Jul 25, 2019
1 parent 34ab803 commit 0ce85b2
Show file tree
Hide file tree
Showing 6 changed files with 2,514 additions and 2,323 deletions.
17 changes: 11 additions & 6 deletions .babelrc
@@ -1,10 +1,15 @@
{
"presets": [
["env", {
"targets": {
"node": 6
[
"@babel/preset-env",
{
"targets": {
"node": "current"
}
}
}]
]
],
"plugins": ["transform-object-rest-spread"]
}
"plugins": [
"@babel/plugin-proposal-object-rest-spread"
]
}
25 changes: 4 additions & 21 deletions .eslintrc.json
@@ -1,27 +1,10 @@
{
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "script"
},
"extends": ["okonet", "plugin:node/recommended"],
"plugins": ["node"],
"extends": ["okonet/node"],
"rules": {
"strict": ["error", "global"],
"no-console": "off",
"prefer-destructuring": [
"error",
{
"VariableDeclarator": {
"array": true,
"object": true
},
"AssignmentExpression": {
"array": false,
"object": false
}
}
],
"node/no-unsupported-features": ["error", "8.12.0"],
"node/no-unsupported-features/es-syntax": ["error", { "version": ">=8.12.0" }],
"prettier/prettier": "off",
"node/no-unsupported-features": ["error", "8.6.0"]
"require-atomic-updates": "off"
}
}
57 changes: 37 additions & 20 deletions package.json
Expand Up @@ -12,7 +12,10 @@
],
"main": "./src/index.js",
"bin": "./bin/lint-staged",
"files": ["src", "bin"],
"files": [
"src",
"bin"
],
"scripts": {
"cz": "git-cz",
"lint:base": "eslint --rule \"prettier/prettier: 2\"",
Expand Down Expand Up @@ -43,33 +46,47 @@
"stringify-object": "^3.3.0"
},
"devDependencies": {
"babel-core": "^6.26.3",
"babel-jest": "^23.6.0",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-preset-env": "^1.6.0",
"commitizen": "^2.9.6",
"consolemock": "^1.0.2",
"cz-conventional-changelog": "^2.0.0",
"eslint": "^4.18.1",
"eslint-config-okonet": "^5.0.1",
"eslint-plugin-node": "^6.0.0",
"fs-extra": "^8.0.1",
"husky": "^1.1.4",
"jest": "^23.6.0",
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/preset-env": "^7.5.5",
"babel-eslint": "^10.0.2",
"babel-jest": "^24.8.0",
"commitizen": "^4.0.3",
"consolemock": "^1.1.0",
"cz-conventional-changelog": "^3.0.2",
"eslint": "^6.1.0",
"eslint-config-okonet": "^7.0.2",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-flowtype": "^3.12.1",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "^7.14.2",
"fs-extra": "^8.1.0",
"husky": "^3.0.1",
"jest": "^24.8.0",
"jest-snapshot-serializer-ansi": "^1.0.0",
"jsonlint": "^1.6.2",
"prettier": "1.11.1",
"tmp": "0.0.33"
"jsonlint": "^1.6.3",
"prettier": "1.18.2",
"tmp": "0.1.0"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
},
"jest": {
"collectCoverageFrom": ["src/**/*.js"],
"setupFiles": ["./testSetup.js"],
"snapshotSerializers": ["jest-snapshot-serializer-ansi"],
"collectCoverage": true,
"collectCoverageFrom": [
"src/**/*.js"
],
"setupFiles": [
"./testSetup.js"
],
"snapshotSerializers": [
"jest-snapshot-serializer-ansi"
],
"testEnvironment": "node"
},
"keywords": [
Expand Down
7 changes: 3 additions & 4 deletions src/generateTasks.js
Expand Up @@ -59,10 +59,9 @@ module.exports = async function generateTasks({
matchBase: !pattern.includes('/'),
dot: true
}
).map(
file =>
// Return absolute path after the filter is run
relative ? path.normalize(file) : path.resolve(cwd, file)
).map(file =>
// Return absolute path after the filter is run
relative ? path.normalize(file) : path.resolve(cwd, file)
)

const task = { pattern, commands, fileList }
Expand Down
5 changes: 3 additions & 2 deletions test/.eslintrc.json
@@ -1,6 +1,6 @@
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 7,
"sourceType": "module"
},
"env": {
Expand All @@ -9,6 +9,7 @@
},
"rules": {
"no-global-assign": ["error", { "exceptions": ["console"] }],
"node/no-unsupported-features": "off"
"node/no-unsupported-features": "off",
"node/no-unsupported-features/es-syntax": "off"
}
}

0 comments on commit 0ce85b2

Please sign in to comment.