From 649faf4b2ba44bb8fe298ddd7599dd338a24f496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Wed, 4 Mar 2020 22:00:57 +0100 Subject: [PATCH] chore: Update dependencies --- .all-contributorsrc | 128 +++++++++++++++++++++++++++++++++ .eslintrc | 1 - .gitignore | 3 - .huskyrc.js | 5 ++ .prettierignore | 3 + .prettierrc.js | 9 +-- .travis.yml | 28 +++++--- README.md | 171 ++++++++++++++++++++++++++++++++++++-------- package.json | 50 ++++++------- 9 files changed, 323 insertions(+), 75 deletions(-) create mode 100644 .all-contributorsrc delete mode 100644 .eslintrc create mode 100644 .huskyrc.js create mode 100644 .prettierignore diff --git a/.all-contributorsrc b/.all-contributorsrc new file mode 100644 index 0000000..317bf71 --- /dev/null +++ b/.all-contributorsrc @@ -0,0 +1,128 @@ +{ + "projectName": "eslint-config-kentcdodds", + "projectOwner": "kentcdodds", + "imageSize": 100, + "commit": false, + "commitConvention": "none", + "contributorsPerLine": 7, + "repoHost": "https://github.com", + "repoType": "github", + "skipCi": false, + "files": [ + "README.md" + ], + "contributors": [ + { + "login": "kentcdodds", + "name": "Kent C. Dodds", + "avatar_url": "https://avatars.githubusercontent.com/u/1500684?v=3", + "profile": "https://kentcdodds.com", + "contributions": [ + "code", + "doc", + "infra" + ] + }, + { + "login": "BarryThePenguin", + "name": "Jonathan Haines", + "avatar_url": "https://avatars3.githubusercontent.com/u/1351912?v=4", + "profile": "http://jonno.dev", + "contributions": [ + "code" + ] + }, + { + "login": "zack9433", + "name": "Zack Yang", + "avatar_url": "https://avatars3.githubusercontent.com/u/1610642?v=4", + "profile": "https://github.com/zack9433", + "contributions": [ + "code" + ] + }, + { + "login": "Mohamed3on", + "name": "Mohamed Oun", + "avatar_url": "https://avatars2.githubusercontent.com/u/12295159?v=4", + "profile": "https://mohamed3on.online/", + "contributions": [ + "code" + ] + }, + { + "login": "alexandernanberg", + "name": "Alexander Nanberg", + "avatar_url": "https://avatars3.githubusercontent.com/u/8997319?v=4", + "profile": "https://alexandernanberg.com", + "contributions": [ + "code" + ] + }, + { + "login": "huchenme", + "name": "Hu Chen", + "avatar_url": "https://avatars3.githubusercontent.com/u/2078389?v=4", + "profile": "https://huchen.dev", + "contributions": [ + "code" + ] + }, + { + "login": "weyert", + "name": "Weyert de Boer", + "avatar_url": "https://avatars3.githubusercontent.com/u/7049?v=4", + "profile": "https://github.com/weyert", + "contributions": [ + "code" + ] + }, + { + "login": "ultrox", + "name": "Marko Vujanic", + "avatar_url": "https://avatars3.githubusercontent.com/u/3077558?v=4", + "profile": "http://ma.vu", + "contributions": [ + "code" + ] + }, + { + "login": "MichaelDeBoey", + "name": "MichaΓ«l De Boey", + "avatar_url": "https://avatars3.githubusercontent.com/u/6643991?v=4", + "profile": "https://michaeldeboey.be", + "contributions": [ + "code", + "doc", + "tool" + ] + }, + { + "login": "jdorfman", + "name": "Justin Dorfman", + "avatar_url": "https://avatars1.githubusercontent.com/u/398230?v=4", + "profile": "https://www.justindorfman.com", + "contributions": [ + "doc" + ] + }, + { + "login": "arvigeus", + "name": "Nikolay Stoynov", + "avatar_url": "https://avatars2.githubusercontent.com/u/4872470?v=4", + "profile": "http://arvigeus.github.com", + "contributions": [ + "doc" + ] + }, + { + "login": "andrewmcodes", + "name": "Andrew Mason", + "avatar_url": "https://avatars1.githubusercontent.com/u/18423853?v=4", + "profile": "https://www.andrewm.codes", + "contributions": [ + "doc" + ] + } + ] +} diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 981f964..0000000 --- a/.eslintrc +++ /dev/null @@ -1 +0,0 @@ -{"extends": ["./index.js"]} diff --git a/.gitignore b/.gitignore index 09048d2..8e0c70c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,7 @@ node_modules coverage dist -.opt-in -.opt-out .DS_Store -.eslintcache # these cause more harm than good # when working with contributors diff --git a/.huskyrc.js b/.huskyrc.js new file mode 100644 index 0000000..851d772 --- /dev/null +++ b/.huskyrc.js @@ -0,0 +1,5 @@ +module.exports = { + hooks: { + 'pre-commit': 'pretty-quick --staged && npm run validate', + }, +} diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..9c62828 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +node_modules +coverage +dist diff --git a/.prettierrc.js b/.prettierrc.js index 13f4041..4679d9b 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,8 +1 @@ -module.exports = { - bracketSpacing: false, - endOfLine: 'lf', - proseWrap: 'always', - semi: false, - singleQuote: true, - trailingComma: 'all', -} +module.exports = require('kcd-scripts/prettier') diff --git a/.travis.yml b/.travis.yml index 7382082..654d1b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,23 @@ -sudo: false language: node_js -cache: - directories: - - ~/.npm +cache: npm notifications: email: false -node_js: '8' +node_js: + - 8.10 + - 10 + - 12 + - node install: npm install -script: npm run validate -after_success: - - npx -p semantic-release@7 -c "semantic-release pre && npm publish && - semantic-release post" +script: + - npm run validate + - npx codecov@3 branches: - only: master + only: + - master + - beta + +jobs: + include: + - stage: release + node_js: 12 + script: node src travis-release diff --git a/README.md b/README.md index 8fe6533..56a1952 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,62 @@ -# eslint-config-kentcdodds +
+

eslint-config-kentcdodds

-[![travis build](https://img.shields.io/travis/kentcdodds/eslint-config-kentcdodds.svg?style=flat-square)](https://travis-ci.org/kentcdodds/eslint-config-kentcdodds) -[![version](https://img.shields.io/npm/v/eslint-config-kentcdodds.svg?style=flat-square)](http://npm.im/eslint-config-kentcdodds) -[![downloads](https://img.shields.io/npm/dm/eslint-config-kentcdodds.svg?style=flat-square)](http://npm-stat.com/charts.html?package=eslint-config-kentcdodds&from=2015-08-01) -[![MIT License](https://img.shields.io/npm/l/eslint-config-kentcdodds.svg?style=flat-square)](http://opensource.org/licenses/MIT) -[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release) +

ESLint rules for all of my personal projects. Feel free to use these conventions :-)

+
-ESLint rules for all of my personal projects. Feel free to use these conventions -:-) +--- -## Usage + +[![Build Status][build-badge]][build] +[![version][version-badge]][package] +[![downloads][downloads-badge]][npmtrends] +[![MIT License][license-badge]][license] + + +[![All Contributors](https://img.shields.io/badge/all_contributors-12-orange.svg?style=flat-square)](#contributors-) + +[![PRs Welcome][prs-badge]][prs] +[![Code of Conduct][coc-badge]][coc] + + +## Table of Contents + + + + +- [Installation](#installation) +- [Usage](#usage) + - [Other configs](#other-configs) + - [Things to know](#things-to-know) +- [Issues](#issues) + - [πŸ› Bugs](#-bugs) + - [πŸ’‘ Feature Requests](#-feature-requests) +- [Contributors ✨](#contributors-) +- [LICENSE](#license) + + + +## Installation -Install the conventions by running: +This module is distributed via [npm][npm] which is bundled with [node][node] and +should be installed as one of your project's `devDependencies`: ``` -npm install --save-dev eslint eslint-config-kentcdodds +npm install --save-dev eslint-config-kentcdodds ``` -Then add the extends to your `.eslintrc`: +This library has a required `peerDependencies` listing for [`eslint`][eslint] + +## Usage + +Then add the extends to your `.eslintrc.js`: ```javascript -{ - "extends": "kentcdodds", - "rules": { +module.exports = { + extends: 'kentcdodds', + rules: { // your overrides - } + }, } ``` @@ -36,22 +68,23 @@ needed. You can use them standalone: ```javascript -{ - "extends": "kentcdodds/" +module.exports = { + extends: 'kentcdodds/', } ``` Or in combination with the base config (recommended) ```javascript -{ - "extends": ["kentcdodds", "kentcdodds/"] +module.exports = { + extends: ['kentcdodds', 'kentcdodds/'], } ``` -**Note**: Due to [this bug](https://github.com/eslint/eslint/issues/3458) you need to have the associated -plugins installed to make things work. I recommend adding them as dependencies -to your project if you're going to use the config for it. +**Note**: Due to [this bug](https://github.com/eslint/eslint/issues/3458) you +need to have the associated plugins installed to make things work. I recommend +adding them as dependencies to your project if you're going to use the config +for it. - `babel-module`: [babel-plugin-module-resolver](https://www.npmjs.com/package/babel-plugin-module-resolver) @@ -89,16 +122,96 @@ to your project if you're going to use the config for it. #### Example of highly customized config ```javascript -{ - "extends": [ - "kentcdodds/possible-errors", "kentcdodds/best-practices", - "kentcdodds/es6/possible-errors", "kentcdodds/import", - "kentcdodds/jest" +module.exports = { + extends: [ + 'kentcdodds/possible-errors', + 'kentcdodds/best-practices', + 'kentcdodds/es6/possible-errors', + 'kentcdodds/import', + 'kentcdodds/jest', ], - "rules": { /* custom rules */ } + rules: { + /* custom rules */ + }, } ``` +## Issues + +_Looking to contribute? Look for the [Good First Issue][good-first-issue] +label._ + +### πŸ› Bugs + +Please file an issue for bugs, missing documentation, or unexpected behavior. + +[**See Bugs**][bugs] + +### πŸ’‘ Feature Requests + +Please file an issue to suggest new features. Vote on feature requests by adding +a πŸ‘. This helps maintainers prioritize what to work on. + +[**See Feature Requests**][requests] + +## Contributors ✨ + +Thanks goes to these people ([emoji key][emojis]): + + + + + + + + + + + + + + + + + + + + + +

Kent C. Dodds

πŸ’» πŸ“– πŸš‡

Jonathan Haines

πŸ’»

Zack Yang

πŸ’»

Mohamed Oun

πŸ’»

Alexander Nanberg

πŸ’»

Hu Chen

πŸ’»

Weyert de Boer

πŸ’»

Marko Vujanic

πŸ’»

MichaΓ«l De Boey

πŸ’» πŸ“– πŸ”§

Justin Dorfman

πŸ“–

Nikolay Stoynov

πŸ“–

Andrew Mason

πŸ“–
+ + + + + + +This project follows the [all-contributors][all-contributors] specification. +Contributions of any kind welcome! + ## LICENSE MIT + + +[npm]: https://www.npmjs.com +[node]: https://nodejs.org +[build-badge]: https://img.shields.io/travis/com/kentcdodds/eslint-config-kentcdodds.svg?style=flat-square +[build]: https://travis-ci.com/kentcdodds/eslint-config-kentcdodds +[version-badge]: https://img.shields.io/npm/v/eslint-config-kentcdodds.svg?style=flat-square +[package]: https://www.npmjs.com/package/eslint-config-kentcdodds +[downloads-badge]: https://img.shields.io/npm/dm/eslint-config-kentcdodds.svg?style=flat-square +[npmtrends]: http://www.npmtrends.com/eslint-config-kentcdodds +[license-badge]: https://img.shields.io/npm/l/eslint-config-kentcdodds.svg?style=flat-square +[license]: https://github.com/kentcdodds/eslint-config-kentcdodds/blob/master/LICENSE +[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square +[prs]: http://makeapullrequest.com +[coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square +[coc]: https://github.com/kentcdodds/eslint-config-kentcdodds/blob/master/other/CODE_OF_CONDUCT.md +[emojis]: https://github.com/all-contributors/all-contributors#emoji-key +[all-contributors]: https://g.all-contributorsrcithub.com/all-contributors/all-contributors +[bugs]: https://github.com/kentcdodds/eslint-config-kentcdodds/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Acreated-desc+label%3Abug +[requests]: https://github.com/kentcdodds/eslint-config-kentcdodds/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3Aenhancement +[good-first-issue]: https://github.com/kentcdodds/eslint-config-kentcdodds/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3Aenhancement+label%3A%22good+first+issue%22 + +[eslint]: https://github.com/eslint/eslint + diff --git a/package.json b/package.json index d0ee002..8634819 100644 --- a/package.json +++ b/package.json @@ -4,24 +4,19 @@ "description": "ESLint rules according to kentcdodds' personal preference", "main": "index.js", "scripts": { - "lint": "eslint .", - "test": "npm-run-all --parallel lint find-new-rules", "find-new-rules": "npm-run-all --parallel find-new-rules:*", - "find-new-rules:main": "eslint-find-rules --unused ./index.js", - "find-new-rules:jsx-a11y": "eslint-find-rules --unused ./other/test/jsx-a11y/index.js", "find-new-rules:jest": "eslint-find-rules --unused ./other/test/jest/index.js", + "find-new-rules:jsx-a11y": "eslint-find-rules --unused ./other/test/jsx-a11y/index.js", + "find-new-rules:main": "eslint-find-rules --unused ./index.js", "find-new-rules:react": "eslint-find-rules --unused ./other/test/react/index.js", "find-new-rules:webpack": "eslint-find-rules --unused ./other/test/webpack/index.js", - "validate": "npm t" - }, - "husky": { - "hooks": { - "pre-commit": "pretty-quick --staged && npm run validate" - } + "lint": "kcd-scripts lint", + "test": "npm-run-all --parallel lint find-new-rules", + "validate": "kcd-scripts validate lint,test" }, "repository": { "type": "git", - "url": "https://github.com/kentcdodds/eslint-config-kentcdodds.git" + "url": "https://github.com/kentcdodds/eslint-config-kentcdodds" }, "keywords": [ "eslint", @@ -31,39 +26,46 @@ "javascript", "styleguide" ], - "author": "Kent C. Dodds (http://kentcdodds.com/)", + "author": "Kent C. Dodds (https://kentcdodds.com)", "license": "MIT", "bugs": { "url": "https://github.com/kentcdodds/eslint-config-kentcdodds/issues" }, "homepage": "https://github.com/kentcdodds/eslint-config-kentcdodds#readme", "dependencies": { - "babel-eslint": "^10.0.3", - "eslint-config-prettier": "^6.10.0", + "babel-eslint": "^10.1.0", + "eslint-config-prettier": "^6.10.1", "eslint-import-resolver-webpack": "^0.12.1", "eslint-plugin-babel": "^5.3.0", - "eslint-plugin-import": "^2.20.1", - "eslint-plugin-jest": "^23.8.0", + "eslint-plugin-import": "^2.20.2", + "eslint-plugin-jest": "^23.8.2", "eslint-plugin-jsx-a11y": "^6.2.3", - "eslint-plugin-react": "^7.18.3", - "eslint-plugin-react-hooks": "^2.4.0", + "eslint-plugin-react": "^7.19.0", + "eslint-plugin-react-hooks": "^3.0.0", "read-pkg-up": "^7.0.1", - "semver": "^7.1.3", - "webpack": "^4.41.6" + "semver": "^7.2.2", + "webpack": "^4.42.1" }, "peerDependencies": { "eslint": ">=6" }, "devDependencies": { - "eslint": "^6.7.2", + "eslint": "^6.8.0", "eslint-find-rules": "^3.4.0", - "husky": "^4.2.3", + "kcd-scripts": "^5.9.0", "npm-run-all": "^4.1.5", - "prettier": "1.19.1", "pretty-quick": "^2.0.1" }, + "eslintConfig": { + "extends": "./index.js" + }, + "eslintIgnore": [ + "node_modules", + "coverage", + "dist" + ], "engines": { - "node": ">=8", + "node": ">=8.10", "npm": ">=6", "yarn": ">=1" }