Skip to content

Commit

Permalink
feat(lint): centralize lint command & config
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphaël Benitte authored and Raphaël Benitte committed Feb 1, 2018
1 parent f24cb08 commit e8e38da
Show file tree
Hide file tree
Showing 35 changed files with 228 additions and 2,204 deletions.
File renamed without changes.
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,24 @@ endef
#
########################################################################################################################

packages-lint: ##@1 packages run eslint on packages
package-lint-%: ##@1 packages run eslint on package
@echo "${YELLOW}Running eslint on package ${WHITE}@nivo/${*}${RESET}"
@./node_modules/.bin/eslint ./packages/nivo-${*}/{src,tests}

packages-lint: ##@1 packages run eslint on all packages
@echo "${YELLOW}Running eslint on all packages${RESET}"
@./node_modules/.bin/lerna run lint
@./node_modules/.bin/eslint \
--ignore-pattern 'nivo-core' \
--ignore-pattern 'nivo-stream' \
--ignore-pattern 'nivo-sunburst' \
--ignore-pattern 'nivo-pie' \
--ignore-pattern 'nivo-radar' \
--ignore-pattern 'nivo-heatmap' \
--ignore-pattern 'nivo-treemap' \
--ignore-pattern 'nivo-voronoi' \
--ignore-pattern 'nivo-line' \
--ignore-pattern 'nivo-generators' \
./packages/*/{src,tests}

packages-test: ##@1 packages run tests for all packages
# stream can be used for a mire verbose output
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,11 @@
"@storybook/addon-info": "^3.2.17",
"@storybook/addon-knobs": "^3.2.17",
"@storybook/react": "^3.2.17",
"babel-eslint": "^8.2.1",
"chalk": "^2.3.0",
"clog-cli": "^1.0.0",
"eslint": "^4.12.1",
"eslint": "^4.16.0",
"eslint-plugin-react": "^7.6.0",
"gh-pages": "^1.0.0",
"lerna": "^2.5.1",
"lodash": "^4.17.4",
Expand Down
4 changes: 0 additions & 4 deletions packages/nivo-bar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,8 @@
"@nivo/babel-preset": "0.33.0",
"@nivo/generators": "0.33.0",
"babel-cli": "^6.26.0",
"babel-eslint": "^8.0.3",
"babel-jest": "^20.0.3",
"cross-env": "^5.0.5",
"eslint": "^4.12.1",
"eslint-plugin-react": "^7.5.1",
"jest": "^21.0.1",
"react": "16.2.0",
"react-dom": "16.2.0",
Expand All @@ -38,7 +35,6 @@
"access": "public"
},
"scripts": {
"lint": "eslint src stories tests",
"test": "jest --verbose ./tests",
"test:cover": "jest --verbose --coverage ./tests"
}
Expand Down
Loading

0 comments on commit e8e38da

Please sign in to comment.