diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..6095588 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: 'github-actions' + directory: '/' + schedule: + interval: daily diff --git a/CHANGELOG.md b/CHANGELOG.md index e2df49d..2a8cfed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [0.0.7](https://github.com/john-d-pelingo/jdp-scripts/compare/v0.0.6...v0.0.7) (2020-12-02) + + +### Features + +* do not extend eslint-config ([cebe150](https://github.com/john-d-pelingo/jdp-scripts/commit/cebe1508dee21086e635e7b672694178796c8876)) +* do not extend eslint-config-typescript ([18fc7ec](https://github.com/john-d-pelingo/jdp-scripts/commit/18fc7ecd41c768068a65b35a602be1554658ce50)) + ### [0.0.6](https://github.com/john-d-pelingo/jdp-scripts/compare/v0.0.5...v0.0.6) (2020-12-01) diff --git a/README.md b/README.md index 65fe01f..91c4947 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ -# jdp-scripts +# jdp-scripts [![GitHub Build Status][shield-github-build-status]][shield-github-build-status] [![MIT License][shield-license]][license] My custom configurations when dealing with JavaScript applications. + +## Script Configurations + +- [eslint-config](./packages/eslint-config) +- [eslint-config-typescript](./packages/eslint-config-typescript) +- [eslint-config-typescript-react](./packages/eslint-config-typescript-react) +- [prettier-config](./packages/prettier-config) + +## License + +[MIT][license] © 2020-present + +[license]: LICENSE +[shield-github-build-status]: + https://github.com/john-d-pelingo/jdp-scripts/workflows/npm-publish/badge.svg +[shield-license]: https://img.shields.io/badge/License-MIT-lavender.svg diff --git a/docs/TODOS.md b/docs/TODOS.md index b047118..397866b 100644 --- a/docs/TODOS.md +++ b/docs/TODOS.md @@ -1,5 +1,3 @@ # TODOs -- configure upgrade of dependencies with github actions -- add badges in readme -- add instructions to install +- add stylelint configuration diff --git a/package.json b/package.json index a988dbe..98c3467 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.0.6", + "version": "0.0.7", "workspaces": [ "packages/*" ], diff --git a/packages/eslint-config-typescript-react/.eslintrc.js b/packages/eslint-config-typescript-react/.eslintrc.js index 2fe2f23..77a11a7 100644 --- a/packages/eslint-config-typescript-react/.eslintrc.js +++ b/packages/eslint-config-typescript-react/.eslintrc.js @@ -7,11 +7,38 @@ const config = { parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint', 'import', 'jsx-a11y', 'react-hooks'], extends: [ - '@jdp-dev/eslint-config-typescript', + 'eslint:recommended', 'plugin:react/recommended', + 'plugin:@typescript-eslint/eslint-recommended', + 'plugin:@typescript-eslint/recommended', + 'prettier', 'prettier/react', + 'prettier/@typescript-eslint', + 'plugin:import/typescript', ], rules: { + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/no-var-requires': 'off', + 'import/no-default-export': 'error', + 'import/no-deprecated': 'warn', + 'import/order': [ + 'error', + { + pathGroupsExcludedImportTypes: ['builtin'], + groups: [ + 'builtin', + 'external', + 'internal', + 'unknown', + 'parent', + 'sibling', + 'index', + ], + 'newlines-between': 'always', + alphabetize: { order: 'asc' }, + }, + ], + 'import/prefer-default-export': 'off', 'react-hooks/exhaustive-deps': 'warn', 'react/prop-types': 'off', 'react/react-in-jsx-scope': 'off', diff --git a/packages/eslint-config-typescript-react/README.md b/packages/eslint-config-typescript-react/README.md index 27289f8..af194af 100644 --- a/packages/eslint-config-typescript-react/README.md +++ b/packages/eslint-config-typescript-react/README.md @@ -1,5 +1,44 @@ -# @jdp-dev/eslint-config +# @jdp-dev/eslint-config-typescript-react [![GitHub Build Status][shield-github-build-status]][shield-github-build-status] [![npm][shield-npm]][npm] [![MIT License][shield-license]][license] My shareable [ESLint](https://eslint.org/) config for [TypeScript](https://www.typescriptlang.org/) [React](https://reactjs.org/) projects. + +## Install + +Install `@jdp-dev/eslint-config-typescript-react`: + +```shell script +npm install --save-dev @jdp-dev/eslint-config-typescript-react +``` + +or + +```shell script +yarn add --dev @jdp-dev/eslint-config-typescript-react +``` + +Then, add `@jdp-dev/eslint-config-typescript-react` to the `"extends"` array in +your `.eslintrc.*` file. + + +```json +{ + "extends": [ + "some-other-config-you-use", + "@jdp-dev/eslint-config-typescript-react" + ] +} +``` + +## License + +[MIT][license] © 2020-present + +[license]: ../../LICENSE +[npm]: https://npmjs.org/package/@jdp-dev/eslint-config-typescript-react +[shield-github-build-status]: + https://github.com/john-d-pelingo/jdp-scripts/workflows/npm-publish/badge.svg +[shield-license]: https://img.shields.io/badge/License-MIT-lavender.svg +[shield-npm]: + https://img.shields.io/npm/v/@jdp-dev/eslint-config-typescript-react.svg diff --git a/packages/eslint-config-typescript-react/package.json b/packages/eslint-config-typescript-react/package.json index 17a0e89..a6adaa1 100644 --- a/packages/eslint-config-typescript-react/package.json +++ b/packages/eslint-config-typescript-react/package.json @@ -1,6 +1,6 @@ { "name": "@jdp-dev/eslint-config-typescript-react", - "version": "0.0.6", + "version": "0.0.7", "description": "My shareable ESLint config for TypeScript React projects.", "private": false, "homepage": "https://github.com/john-d-pelingo/jdp-scripts", @@ -40,7 +40,6 @@ "typescript": "^4.1.2" }, "dependencies": { - "@jdp-dev/eslint-config-typescript": "^0.0.5", "@typescript-eslint/eslint-plugin": "^4.9.0", "@typescript-eslint/parser": "^4.9.0", "eslint": "^7.14.0", diff --git a/packages/eslint-config-typescript/.eslintrc.js b/packages/eslint-config-typescript/.eslintrc.js index a6a5e97..788667d 100644 --- a/packages/eslint-config-typescript/.eslintrc.js +++ b/packages/eslint-config-typescript/.eslintrc.js @@ -7,15 +7,36 @@ const config = { parser: '@typescript-eslint/parser', plugins: ['@typescript-eslint', 'import', 'jsx-a11y'], extends: [ - '@jdp-dev/eslint-config', + 'eslint:recommended', 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', + 'prettier', 'prettier/@typescript-eslint', 'plugin:import/typescript', ], rules: { '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/no-var-requires': 'off', + 'import/no-default-export': 'error', + 'import/no-deprecated': 'warn', + 'import/order': [ + 'error', + { + pathGroupsExcludedImportTypes: ['builtin'], + groups: [ + 'builtin', + 'external', + 'internal', + 'unknown', + 'parent', + 'sibling', + 'index', + ], + 'newlines-between': 'always', + alphabetize: { order: 'asc' }, + }, + ], + 'import/prefer-default-export': 'off', }, settings: { 'import/ignore': ['node_modules'], diff --git a/packages/eslint-config-typescript/README.md b/packages/eslint-config-typescript/README.md index 4f762e8..84df266 100644 --- a/packages/eslint-config-typescript/README.md +++ b/packages/eslint-config-typescript/README.md @@ -1,3 +1,42 @@ -# @jdp-dev/eslint-config-typescript +# @jdp-dev/eslint-config-typescript [![GitHub Build Status][shield-github-build-status]][shield-github-build-status] [![npm][shield-npm]][npm] [![MIT License][shield-license]][license] -My shareable [ESLint](https://eslint.org/) config for [TypeScript](https://www.typescriptlang.org/) projects. +My shareable [ESLint](https://eslint.org/) config for +[TypeScript](https://www.typescriptlang.org/) projects. + +## Install + +Install `@jdp-dev/eslint-config-typescript`: + +```shell script +npm install --save-dev @jdp-dev/eslint-config-typescript +``` + +or + +```shell script +yarn add --dev @jdp-dev/eslint-config-typescript +``` + +Then, add `@jdp-dev/eslint-config-typescript` to the `"extends"` array in your +`.eslintrc.*` file. + + +```json +{ + "extends": [ + "some-other-config-you-use", + "@jdp-dev/eslint-config-typescript" + ] +} +``` + +## License + +[MIT][license] © 2020-present + +[license]: ../../LICENSE +[npm]: https://npmjs.org/package/@jdp-dev/eslint-config-typescript +[shield-github-build-status]: + https://github.com/john-d-pelingo/jdp-scripts/workflows/npm-publish/badge.svg +[shield-license]: https://img.shields.io/badge/License-MIT-lavender.svg +[shield-npm]: https://img.shields.io/npm/v/@jdp-dev/eslint-config-typescript.svg diff --git a/packages/eslint-config-typescript/package.json b/packages/eslint-config-typescript/package.json index 1a3af11..0ba470e 100644 --- a/packages/eslint-config-typescript/package.json +++ b/packages/eslint-config-typescript/package.json @@ -1,6 +1,6 @@ { "name": "@jdp-dev/eslint-config-typescript", - "version": "0.0.6", + "version": "0.0.7", "description": "My shareable ESLint config for TypeScript projects.", "private": false, "homepage": "https://github.com/john-d-pelingo/jdp-scripts", @@ -37,7 +37,6 @@ "typescript": "^4.1.2" }, "dependencies": { - "@jdp-dev/eslint-config": "^0.0.5", "@typescript-eslint/eslint-plugin": "^4.9.0", "@typescript-eslint/parser": "^4.9.0", "eslint": "^7.14.0", diff --git a/packages/eslint-config/README.md b/packages/eslint-config/README.md index 4bb3cb0..ad5a285 100644 --- a/packages/eslint-config/README.md +++ b/packages/eslint-config/README.md @@ -1,4 +1,42 @@ -# @jdp-dev/eslint-config +# @jdp-dev/eslint-config [![GitHub Build Status][shield-github-build-status]][shield-github-build-status] [![npm][shield-npm]][npm] [![MIT License][shield-license]][license] My shareable [ESLint](https://eslint.org/) config for [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript) projects. + +## Install + +Install `@jdp-dev/eslint-config`: + +```shell script +npm install --save-dev @jdp-dev/eslint-config +``` + +or + +```shell script +yarn add --dev @jdp-dev/eslint-config +``` + +Then, add `@jdp-dev/eslint-config` to the `"extends"` array in your +`.eslintrc.*` file. + + +```json +{ + "extends": [ + "some-other-config-you-use", + "@jdp-dev/eslint-config" + ] +} +``` + +## License + +[MIT][license] © 2020-present + +[license]: ../../LICENSE +[npm]: https://npmjs.org/package/@jdp-dev/eslint-config +[shield-github-build-status]: + https://github.com/john-d-pelingo/jdp-scripts/workflows/npm-publish/badge.svg +[shield-license]: https://img.shields.io/badge/License-MIT-lavender.svg +[shield-npm]: https://img.shields.io/npm/v/@jdp-dev/eslint-config.svg diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index fcf9ba4..ee3c1e7 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -1,6 +1,6 @@ { "name": "@jdp-dev/eslint-config", - "version": "0.0.6", + "version": "0.0.7", "description": "My shareable ESLint config for JavaScript projects.", "private": false, "homepage": "https://github.com/john-d-pelingo/jdp-scripts", diff --git a/packages/prettier-config/README.md b/packages/prettier-config/README.md index c1de96c..d7cea6f 100644 --- a/packages/prettier-config/README.md +++ b/packages/prettier-config/README.md @@ -1,3 +1,42 @@ -# @jdp-dev/prettier-config +# @jdp-dev/prettier-config [![GitHub Build Status][shield-github-build-status]][shield-github-build-status] [![npm][shield-npm]][npm] [![MIT License][shield-license]][license] My shareable [Prettier](https://prettier.io/) config. + +## Install + +Install `@jdp-dev/prettier-config`: + +```shell script +npm install --save-dev @jdp-dev/prettier-config +``` + +or + +```shell script +yarn add --dev @jdp-dev/prettier-config +``` + +Then, reference it in your `package.json`. + + +```json +{ + "name": "my-cool-js-app", + "version": "69.420", + "prettier": "@jdp-dev/prettier-config" +} +``` + +Or, you can use it in other ways as described in the +[official documentation](https://prettier.io/docs/en/configuration.html#sharing-configurations). + +## License + +[MIT][license] © 2020-present + +[license]: ../../LICENSE +[npm]: https://npmjs.org/package/@jdp-dev/prettier-config +[shield-github-build-status]: + https://github.com/john-d-pelingo/jdp-scripts/workflows/npm-publish/badge.svg +[shield-license]: https://img.shields.io/badge/License-MIT-lavender.svg +[shield-npm]: https://img.shields.io/npm/v/@jdp-dev/prettier-config.svg diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index cfae349..5e3a2e1 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -1,6 +1,6 @@ { "name": "@jdp-dev/prettier-config", - "version": "0.0.6", + "version": "0.0.7", "description": "My shareable Prettier config.", "private": false, "homepage": "https://github.com/john-d-pelingo/jdp-scripts", diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..a85807a --- /dev/null +++ b/renovate.json @@ -0,0 +1,9 @@ +{ + "assignees": ["john-d-pelingo"], + "extends": ["config:base"], + "groupName": "all", + "rangeStrategy": "replace", + "prCreation": "status-success", + "schedule": ["every weekend"], + "timezone": "Europe/Berlin" +} diff --git a/yarn.lock b/yarn.lock index 04e4ffd..36058d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -190,15 +190,6 @@ minimatch "^3.0.4" strip-json-comments "^3.1.1" -"@jdp-dev/eslint-config@^0.0.5": - version "0.0.5" - resolved "https://registry.yarnpkg.com/@jdp-dev/eslint-config/-/eslint-config-0.0.5.tgz#25a05d3b1bc57ad0a6e38ef6afbf1cca121dedeb" - integrity sha512-dnldoW9drJmhYux04hH3ClbKlPs+U23kY6c4MczgHc4oq+15Q+Bnnp0HUioWKPkhKq1l+3QCCJQTM+4OUImi+A== - dependencies: - eslint "^7.14.0" - eslint-config-prettier "^6.15.0" - eslint-plugin-import "^2.22.1" - "@nodelib/fs.scandir@2.1.3": version "2.1.3" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"