Last active
April 24, 2018 13:19
-
-
Save jankalfus/50d6f5fc1fb822583ab5d6ee969cee9d to your computer and use it in GitHub Desktop.
Revisions
-
jankalfus revised this gist
Apr 24, 2018 . 1 changed file with 9 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,8 +2,7 @@ ``` "devDependencies": { "eslint-watch": "^3.1.4", "husky": "^0.14.3", "prettier": "1.12.1", "pretty-quick": "^1.4.1", @@ -17,13 +16,13 @@ ``` "precommit": "pretty-quick --staged && npm run lint-precommit", "prepush": "npm run lint-prepush", "lint-watch": "esw src --color --watch", "lint-precommit": "npm run lint-scss && npm run lint-js", "lint-prepush": "npm run lint-scss && npm run lint-js-strict", "lint-scss": "stylelint src/**/*.scss", "lint-js": "eslint src/**/*.js", "lint-js-strict": "npm run lint-js -- --max-warnings=0"--max-warnings=0" ``` # .editorconfig @@ -69,9 +68,9 @@ indent_size = 2 ``` { "extends": ["react-app"], "rules": { "no-console": "warn" } } ``` -
jankalfus revised this gist
Apr 24, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ "lint:js": "eslint src/**/*.js", "lint:js-strict": "npm run lint:js -- --max-warnings=0" ``` Note: Use only warnings in eslint config. This setup will treat any warnings as errors when attempting to push to a repository. # .editorconfig -
jankalfus revised this gist
Apr 24, 2018 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,6 +23,7 @@ "lint:js": "eslint src/**/*.js", "lint:js-strict": "npm run lint:js -- --max-warnings=0" ``` Note: Use only warnings in eslint config. This setup will treat any warnings as errors when trying to push. # .editorconfig -
jankalfus created this gist
Apr 24, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,76 @@ # package.json dev dependencies ``` "devDependencies": { "eslint-config-prettier": "^2.9.0", "eslint-plugin-prettier": "^2.6.0", "husky": "^0.14.3", "prettier": "1.12.1", "pretty-quick": "^1.4.1", "stylelint": "^9.2.0", "stylelint-scss": "^3.0.1" } ``` # package.json scripts ``` "precommit": "pretty-quick --staged && npm run lint-precommit", "prepush": "npm run lint-prepush", "lint-precommit": "npm run lint:scss && npm run lint:js", "lint-prepush": "npm run lint:scss && npm run lint:js-strict", "lint:scss": "stylelint src/**/*.scss", "lint:js": "eslint src/**/*.js", "lint:js-strict": "npm run lint:js -- --max-warnings=0" ``` # .editorconfig ``` root = true [*] end_of_line = lf insert_final_newline = true charset = utf-8 indent_style = tab indent_size = 4 max_line_length = 100 trim_trailing_whitespace = true [*.json] indent_style = tab indent_size = 2 ``` # .stylelintrc.json ``` { "plugins": ["stylelint-scss"] } ``` # .prettierrc ``` { "singleQuote": true, "trailingComma": "es5", "printWidth": 100, "tabWidth":4, "useTabs": true, "arrowParens": "always" } ``` # .eslintrc.json ``` { "extends": ["react-app", "plugin:prettier/recommended"], "rules": { "no-console": "warn" } } ```