Last active
May 6, 2024 18:12
Revisions
-
codfish revised this gist
May 6, 2024 . 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 @@ -1,4 +1,4 @@ My personal & professional linting setup. Run's Prettier as an ESLint rule via their ESLint plugin. Dynamic support for react or non-react applications depending on your project dependencies. Dynamic inclusion of Kent C Dodds' ESLint Jest config depending on your project dependencies. Convenient opt-in configs for projects using Docker or Ethereum to avoid common false positives. -
codfish revised this gist
Mar 7, 2023 . 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 @@ -2,7 +2,7 @@ My personal & professional linting setup. Extends airbnb's ESLint config first, Convenient opt-in configs for projects using Docker or Ethereum to avoid common false positives. To understand more, see <https://github.com/codfish/eslint-config-codfish>. To avoid having to manually setup everything and add all configuration/boilerplate code to your project, use [cod-scripts](https://github.com/codfish/cod-scripts) instead. It was forked from [kcd-scripts](https://github.com/kentcdodds/kcd-scripts) and ultimately inspired by `react-scripts`. -
codfish revised this gist
Feb 20, 2021 . 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 @@ -30,7 +30,7 @@ Full usage: https://github.com/codfish/cod-scripts#usage - Delete configuration. ```sh sh -c 'rm -f .babelrc* .eslintrc* .eslintignore .huskyrc* .lintstagedrc* .prettierrc* .prettierignore jest.config.js .commitlintrc* commitlint* .markdownlint*' ``` - Delete any configs from the package.json, i.e. `jest`. - Update `package.json` with the following: -
codfish revised this gist
Apr 18, 2020 . 8 changed files with 42 additions and 23 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 @@ -37,8 +37,7 @@ rm -f .babelrc* .eslintrc* .eslintignore .huskyrc* .lintstagedrc* .prettierrc* . ```json "eslintConfig": { "extends": [ "./node_modules/cod-scripts/eslint.js" ] }, "husky": { @@ -48,15 +47,22 @@ rm -f .babelrc* .eslintrc* .eslintignore .huskyrc* .lintstagedrc* .prettierrc* . } } ``` - Adding `eslintConfig` to package.json is not required in theory but helps your editor enforce your eslint configuration. - If you're building a dapp, you can extend `codfish/dapp` as well to adjust some eslint rules that throw false positive errors. ```json "eslintConfig": { "extends": [ "./node_modules/cod-scripts/eslint.js", "codfish/dapp" ] }, ``` - Add desired scripts to `package.json` ## Source Configuration - [.eslintignore](https://github.com/codfish/cod-scripts/blob/master/src/config/eslintignore) - [.eslintrc.js](https://github.com/codfish/cod-scripts/blob/master/src/config/eslintrc.js) - [.prettierignore](https://github.com/codfish/cod-scripts/blob/master/src/config/prettierignore) - [.prettierrc.js](https://github.com/codfish/cod-scripts/blob/master/src/config/prettierrc.js) - [.commitlint.config.js](https://github.com/codfish/cod-scripts/blob/master/src/config/commitlint.config.js) 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 @@ -1 +0,0 @@ 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 @@ -1 +0,0 @@ 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 @@ -1,6 +0,0 @@ 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 @@ -1 +0,0 @@ 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 @@ -1 +0,0 @@ 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 @@ -1 +0,0 @@ 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 @@ -4,7 +4,31 @@ "build:watch": "npm run build -- --watch", "format": "cod-scripts format", "lint": "cod-scripts lint", "lint:commit": "cod-scripts commitlint", "test": "cod-scripts test", "validate": "cod-scripts validate" }, "eslintConfig": { "extends": [ "./node_modules/cod-scripts/eslint.js" ] }, "husky": { "hooks": { "pre-commit": "cod-scripts pre-commit", "commit-msg": "cod-scripts commitlint -E HUSKY_GIT_PARAMS" } }, "commitlint": { "extends": [ "./node_modules/cod-scripts/commitlint" ], "rules": { "scope-case": [2, "always", "pascal-case"], "scope-enum": [2, "always", [ "SomeComponent", "SomeOtherComponent" ]] } } } -
codfish revised this gist
Mar 28, 2020 . 2 changed files with 0 additions and 9 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 @@ -1,8 +0,0 @@ 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 @@ -4,7 +4,6 @@ "build:watch": "npm run build -- --watch", "format": "cod-scripts format", "lint": "cod-scripts lint", "test": "cod-scripts test", "validate": "cod-scripts validate" } -
codfish revised this gist
Mar 28, 2020 . 1 changed file with 0 additions 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 @@ -56,7 +56,6 @@ rm -f .babelrc* .eslintrc* .eslintignore .huskyrc* .lintstagedrc* .prettierrc* . "build:watch": "npm run build -- --watch", "format": "cod-scripts format", "lint": "cod-scripts lint", "test": "cod-scripts test", "validate": "cod-scripts validate" } -
codfish revised this gist
Mar 28, 2020 . 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 @@ -30,7 +30,7 @@ Full usage: https://github.com/codfish/cod-scripts#usage - Delete configuration. ```sh rm -f .babelrc* .eslintrc* .eslintignore .huskyrc* .lintstagedrc* .prettierrc* .prettierignore jest.config.js .commitlintrc* commitlint* .markdownlint* ``` - Delete any configs from the package.json, i.e. `jest`. - Update `package.json` with the following: -
codfish revised this gist
Feb 28, 2020 . No changes.There are no files selected for viewing
-
codfish revised this gist
Feb 28, 2020 . 1 changed file with 2 additions 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 @@ -37,7 +37,8 @@ rm -f .babelrc* .eslintrc* .eslintignore .huskyrc* .lintstagedrc* .prettierrc* . ```json "eslintConfig": { "extends": [ "./node_modules/cod-scripts/eslint.js", "codfish/dapp" ] }, "husky": { -
codfish revised this gist
Dec 20, 2019 . 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 @@ -19,7 +19,7 @@ There has to be a very good reason for an override: https://github.com/codfish/e You may be able to uninstall a number of top-level dependencies from your project but **be careful**. ```sh npm uninstall @babel/core @babel/cli @babel/preset-env @babel/preset-react eslint eslint-config-codfish prettier husky lint-staged jest @commitlint/cli @commitlint/config-conventional markdownlint-cli npm install --save-dev cod-scripts npm install --save @babel/runtime ``` -
codfish revised this gist
Oct 3, 2019 . 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 @@ -51,7 +51,7 @@ rm -f .babelrc* .eslintrc* .eslintignore .huskyrc* .lintstagedrc* .prettierrc* . - Add desired scripts to `package.json` ```json "scripts": { "build": "cod-scripts build", "build:watch": "npm run build -- --watch", "format": "cod-scripts format", "lint": "cod-scripts lint", -
codfish revised this gist
Sep 22, 2019 . 7 changed files with 7 additions and 7 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 @@ -43,7 +43,7 @@ rm -f .babelrc* .eslintrc* .eslintignore .huskyrc* .lintstagedrc* .prettierrc* . "husky": { "hooks": { "pre-commit": "cod-scripts pre-commit", "commit-msg": "cod-scripts commitlint -E HUSKY_GIT_PARAMS" } } ``` 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 @@ -1 +1 @@ # see https://github.com/codfish/cod-scripts/blob/master/src/config/eslintignore 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 @@ -1 +1 @@ // see https://github.com/codfish/cod-scripts/blob/master/src/config/eslintrc.js 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 @@ -1 +1 @@ # see https://github.com/codfish/cod-scripts/blob/master/src/config/prettierignore 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 @@ -1 +1 @@ // see https://github.com/codfish/cod-scripts/blob/master/src/config/prettierrc.js 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 @@ -1 +1 @@ // see https://github.com/codfish/cod-scripts/blob/master/src/config/commitlint.config.js 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 @@ -8,4 +8,4 @@ "test": "cod-scripts test", "validate": "cod-scripts validate" } } -
codfish revised this gist
Sep 19, 2019 . 2 changed files with 3 additions and 11 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 @@ -19,7 +19,7 @@ There has to be a very good reason for an override: https://github.com/codfish/e You may be able to uninstall a number of top-level dependencies from your project but **be careful**. ```sh npm uninstall @babel/core @babel/cli @babel/preset-env @babel/preset-react eslint eslint-config-codfish prettier husky lint-staged jest @commitlint/cli @commitlint/config-conventional npm install --save-dev cod-scripts npm install --save @babel/runtime ``` @@ -30,7 +30,7 @@ Full usage: https://github.com/codfish/cod-scripts#usage - Delete configuration. ```sh rm -f .babelrc* .eslintrc* .eslintignore .huskyrc* .lintstagedrc* .prettierrc* .prettierignore jest.config.js .commitlintrc* commitlint* ``` - Delete any configs from the package.json, i.e. `jest`. - Update `package.json` with the following: 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 @@ -1,9 +1 @@ // see https://github.com/codfish/cod-scripts/blob/master/src/config/commitlint.config.js -
codfish revised this gist
Sep 17, 2019 . 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 @@ -19,7 +19,7 @@ There has to be a very good reason for an override: https://github.com/codfish/e You may be able to uninstall a number of top-level dependencies from your project but **be careful**. ```sh npm uninstall @babel/core @babel/cli @babel/preset-env @babel/preset-react eslint eslint-config-codfish prettier husky lint-staged jest npm install --save-dev cod-scripts npm install --save @babel/runtime ``` -
codfish revised this gist
Sep 16, 2019 . 8 changed files with 65 additions and 69 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 @@ -1,17 +1,62 @@ My personal & professional linting setup. Extends airbnb's ESLint config first, then Prettier. Run's Prettier as an ESLint rule via their ESLint plugin. Dynamic support for react or non-react applications depending on your project dependencies. Dynamic inclusion of Kent C Dodds' ESLint Jest config depending on your project dependencies. Convenient opt-in configs for projects using Docker or Ethereum to avoid common false positives. To understand more, see https://github.com/codfish/eslint-config-codfish. To avoid having to manually setup everything and add all configuration/boilerplate code to your project, use [cod-scripts](https://github.com/codfish/cod-scripts) instead. It was forked from [kcd-scripts](https://github.com/kentcdodds/kcd-scripts) and ultimately inspired by `react-scripts`. ## Why Ultimate goal is maximize code linting coverage, leveraging the power of Prettier while deferring to Airbnb's style guide AS MUCH as possible without breaking anything. Idea being that Airbnb's styleguide happens to be the most popular, well documented, and well maintained open-source JS styleguide. I typically work in very large teams where consensus can be difficult, and linting is like politics, people are generally passionate and rarely unopinionated. I've found that, while we all may not agree on everything in Airbnb's approach, sticking to a styleguide like theirs and avoiding opinionated overrides has had the most success across the teams I've worked on. It also helps relieve the burden of maintaining a custom set of rules (as well as the documentation). There has to be a very good reason for an override: https://github.com/codfish/eslint-config-codfish/blob/2444e8b63426d8cea1e6da47bce1561278ddd2c2/index.js#L19 ## Installation You may be able to uninstall a number of top-level dependencies from your project but **be careful**. ```sh npm uninstall @babel/core @babel/cli @babel/preset-env @babel/preset-react eslint eslint-config-codfish prettier husky lint-staged npm install --save-dev cod-scripts npm install --save @babel/runtime ``` ## Usage Full usage: https://github.com/codfish/cod-scripts#usage - Delete configuration. ```sh rm -f .babelrc* .eslintrc* .eslintignore .huskyrc* .lintstagedrc* .prettierrc* .prettierignore jest.config.js ``` - Delete any configs from the package.json, i.e. `jest`. - Update `package.json` with the following: ```json "eslintConfig": { "extends": [ "./node_modules/cod-scripts/eslint.js" ] }, "husky": { "hooks": { "pre-commit": "cod-scripts pre-commit", "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" } } ``` - Adding `eslintConfig` to package.json is not required in theory but helps your editor enforce your eslint configuration. - Add desired scripts to `package.json` ```json "scripts": { "build": "cod-scripts build -d core", "build:watch": "npm run build -- --watch", "format": "cod-scripts format", "lint": "cod-scripts lint", "lint:md": "markdownlint -i node_modules -i dist .", "test": "cod-scripts test", "validate": "cod-scripts validate" } ``` 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 @@ -1,8 +1 @@ # see https://github.com/codfish/cod-scripts/blob/master/src/config/eslintignore 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 @@ -1,4 +1 @@ // see https://github.com/codfish/cod-scripts/blob/master/src/config/eslintrc.js 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 @@ -1,5 +0,0 @@ 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 @@ -1,8 +1 @@ # see https://github.com/codfish/cod-scripts/blob/master/src/config/prettierignore 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 @@ -1,8 +1 @@ // see https://github.com/codfish/cod-scripts/blob/master/src/config/prettierrc.js 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 @@ -1,23 +0,0 @@ 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 @@ -1,8 +1,11 @@ { "scripts": { "build": "cod-scripts build -d core", "build:watch": "npm run build -- --watch", "format": "cod-scripts format", "lint": "cod-scripts lint", "lint:md": "markdownlint -i node_modules -i dist .", "test": "cod-scripts test", "validate": "cod-scripts validate" } } -
codfish revised this gist
Aug 28, 2019 . 2 changed files with 2 additions and 2 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 @@ -3,8 +3,7 @@ My personal & professional linting setup. Extends airbnb's ESLint config first, ## Installation ```sh npm install --save-dev prettier husky lint-staged @commitlint/cli @commitlint/config-conventional markdownlint-cli npx install-peerdeps --dev eslint-config-codfish ``` 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 @@ -4,5 +4,6 @@ module.exports = { // only allow scopes listed here ]], // https://conventional-changelog.github.io/commitlint/#/reference-rules?id=scope-case // change this depending on your project. pascal-case works well for react components 'scope-case': [2, 'always', 'pascal-case'], }; -
codfish revised this gist
Aug 23, 2019 . 2 changed files with 2 additions and 2 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 @@ -4,4 +4,5 @@ module.exports = { trailingComma: 'all', printWidth: 100, proseWrap: 'always', bracketSpacing: true, }; 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 @@ -1,7 +1,6 @@ { "scripts": { "format": "npm run lint -- --fix", "lint": "eslint .", "lint:commit:ci": "commitlint-travis", "lint:md": "markdownlint -i node_modules ." -
codfish revised this gist
Apr 5, 2019 . 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 @@ -4,6 +4,6 @@ "format": "prettier --write \"**/*.{json,css,scss,md,html}\"", "lint": "eslint .", "lint:commit:ci": "commitlint-travis", "lint:md": "markdownlint -i node_modules ." } } -
codfish revised this gist
Mar 17, 2019 . 4 changed files with 8 additions and 2 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 @@ -1,3 +1,8 @@ module.exports = { extends: ['@commitlint/config-conventional'], 'scope-enum': [2, 'always', [ // only allow scopes listed here ]], // https://conventional-changelog.github.io/commitlint/#/reference-rules?id=scope-case 'scope-case': [2, 'always', 'pascal-case'], }; 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 @@ -5,3 +5,4 @@ build dist public serviceWorker.js !.*.js 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 @@ -5,3 +5,4 @@ build dist public serviceWorker.js !.*.js 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 @@ -3,7 +3,6 @@ "fix": "npm run format && npm run lint -- --fix", "format": "prettier --write \"**/*.{json,css,scss,md,html}\"", "lint": "eslint .", "lint:commit:ci": "commitlint-travis", "lint:md": "markdownlint --ignore node_modules **/*.md" } -
codfish revised this gist
Jan 23, 2019 . 3 changed files with 36 additions and 2 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 @@ -1,9 +1,18 @@ My personal & professional linting setup. Extends airbnb's ESLint config first, then Prettier. Run's Prettier as an ESLint rule via their ESLint plugin. Dynamic support for react or non-react applications depending on your project dependencies. Dynamic inclusion of Kent C Dodds' ESLint Jest config depending on your project dependencies. Ultimate goal is maximize code linting coverage, leveraging the power of Prettier while deferring to Airbnb's style guide AS MUCH as possible without breaking anything. Convenient opt-in configs for projects using Docker or Ethereum to avoid common false positives. To understand more, see https://github.com/codfish/eslint-config-codfish. ## Installation ```sh npm install --save-dev --save-exact prettier npm install --save-dev husky lint-staged @commitlint/cli @commitlint/config-conventional markdownlint-cli npx install-peerdeps --dev eslint-config-codfish ``` ## Usage ```js module.exports = { extends: ['codfish'], root: true, }; ``` 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,23 @@ sudo: false language: node_js node_js: '8' cache: directories: - ~/.npm install: npm install script: - npm run lint:commit:ci - npm run lint:md - npm run lint after_success: - npx -p semantic-release@7 -c "semantic-release pre && npm publish && semantic-release post" branches: only: master
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 @@ -3,6 +3,8 @@ "fix": "npm run format && npm run lint -- --fix", "format": "prettier --write \"**/*.{json,css,scss,md,html}\"", "lint": "eslint .", "lint:commit": "commitlint .", "lint:commit:ci": "commitlint-travis", "lint:md": "markdownlint --ignore node_modules **/*.md" } } -
codfish revised this gist
Jan 22, 2019 . 1 changed file with 1 addition and 2 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 @@ "scripts": { "fix": "npm run format && npm run lint -- --fix", "format": "prettier --write \"**/*.{json,css,scss,md,html}\"", "lint": "eslint .", "lint:md": "markdownlint --ignore node_modules **/*.md" } } -
codfish revised this gist
Jan 22, 2019 . 3 changed files with 3 additions and 3 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 @@ -3,7 +3,7 @@ My personal & professional linting setup. Wraps airbnb's ESLint config, no opini ## Installation Instructions ```sh npm install --save-dev --save-exact prettier npm install --save-dev husky lint-staged @commitlint/cli @commitlint/config-conventional markdownlint-cli npx install-peerdeps --dev eslint-config-codfish ``` 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 @@ -1,5 +1,5 @@ module.exports = { '*.{json,css,scss,html}': ['prettier --write', 'git add'], '*.md': ['prettier --write', 'markdownlint', 'git add'], '*.js': ['eslint --fix', 'git add'], }; 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 @@ -1,7 +1,7 @@ { "scripts": { "fix": "npm run format && npm run lint -- --fix", "format": "prettier --write \"**/*.{json,css,scss,md,html}\"", "lint": "npm run lint:js && npm run lint:md", "lint:js": "eslint .", "lint:md": "markdownlint --ignore node_modules **/*.md" -
codfish revised this gist
Jan 16, 2019 . 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 @@ -4,6 +4,6 @@ "format": "prettier --write \"**/*.{js,json,css,scss,md,html}\"", "lint": "npm run lint:js && npm run lint:md", "lint:js": "eslint .", "lint:md": "markdownlint --ignore node_modules **/*.md" } } -
codfish revised this gist
Jan 15, 2019 . 1 changed file with 3 additions 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 @@ -2,6 +2,8 @@ "scripts": { "fix": "npm run format && npm run lint -- --fix", "format": "prettier --write \"**/*.{js,json,css,scss,md,html}\"", "lint": "npm run lint:js && npm run lint:md", "lint:js": "eslint .", "lint:md": "markdownlint **/*.md" } } -
codfish revised this gist
Jan 15, 2019 . 3 changed files with 5 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 @@ -4,6 +4,6 @@ My personal & professional linting setup. Wraps airbnb's ESLint config, no opini ```sh npm install --save-dev --exact prettier npm install --save-dev husky lint-staged @commitlint/cli @commitlint/config-conventional markdownlint-cli npx install-peerdeps --dev eslint-config-codfish ``` 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 @@ -1,11 +1,5 @@ module.exports = { '*.{json,css,scss,html}': ['prettier --write', 'git add'], '*.md': ['prettier --write', 'markdownlint', 'git add'], '*.js': ['prettier --write', 'eslint --fix', 'git add'], }; 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 @@ -3,4 +3,5 @@ module.exports = { singleQuote: true, trailingComma: 'all', printWidth: 100, proseWrap: 'always', }; -
codfish revised this gist
Jan 12, 2019 . 1 changed file with 8 additions 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 @@ -0,0 +1,8 @@ { "default": true, "line-length": { "line_length": 100, "code_blocks": false, "tables": false } } -
codfish revised this gist
Dec 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 @@ -1,4 +1,4 @@ // override to defer to airbnb style guide. One source of truth! module.exports = { singleQuote: true, trailingComma: 'all', -
codfish revised this gist
Dec 24, 2018 . 1 changed file with 7 additions 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 @@ -0,0 +1,7 @@ { "scripts": { "fix": "npm run format && npm run lint -- --fix", "format": "prettier --write \"**/*.{js,json,css,scss,md,html}\"", "lint": "eslint ." } } -
codfish renamed this gist
Dec 22, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
codfish renamed this gist
Dec 22, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.
NewerOlder