diff --git a/CHANGELOG.md b/CHANGELOG.md index ee6355d..67a57da 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.5](https://github.com/john-d-pelingo/jdp-scripts/compare/v0.0.4...v0.0.5) (2020-12-01) + + +### Features + +* add better test ([2ab66a4](https://github.com/john-d-pelingo/jdp-scripts/commit/2ab66a4210842b5907b07917b44bcb4a8f1ad552)) +* extend eslint-config ([31dc6bb](https://github.com/john-d-pelingo/jdp-scripts/commit/31dc6bb56ff7382499a664914b6f1f7f095b9b46)) + ### [0.0.4](https://github.com/john-d-pelingo/jdp-scripts/compare/v0.0.3...v0.0.4) (2020-12-01) diff --git a/docs/TODOS.md b/docs/TODOS.md index 2396dc7..bc696fd 100644 --- a/docs/TODOS.md +++ b/docs/TODOS.md @@ -3,5 +3,6 @@ - configure upgrade of dependencies with github actions - try to use github packages to publish - find a way to publish on github push -- create multiple ESLint packages for: - - JavaScript only +- add keywords +- add badges in readme +- add instructions to install diff --git a/package.json b/package.json index 832328f..0c39b98 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.0.4", + "version": "0.0.5", "workspaces": [ "packages/*" ], diff --git a/packages/eslint-config-typescript-react/package.json b/packages/eslint-config-typescript-react/package.json index 9aaa9e0..f18257b 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.4", + "version": "0.0.5", "description": "My shareable ESLint config for TypeScript React projects.", "private": false, "homepage": "https://github.com/john-d-pelingo/jdp-scripts", @@ -25,7 +25,6 @@ }, "peerDependencies": { "@typescript-eslint/eslint-plugin": "^4.9.0", - "@typescript-eslint/parser": "^4.9.0", "eslint": "^7.14.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jsx-a11y": "^6.4.1", diff --git a/packages/eslint-config-typescript/.eslintrc.js b/packages/eslint-config-typescript/.eslintrc.js index 788667d..aeb0c9e 100644 --- a/packages/eslint-config-typescript/.eslintrc.js +++ b/packages/eslint-config-typescript/.eslintrc.js @@ -5,38 +5,17 @@ const config = { node: true, }, parser: '@typescript-eslint/parser', - plugins: ['@typescript-eslint', 'import', 'jsx-a11y'], + plugins: ['@typescript-eslint', 'jsx-a11y'], extends: [ - 'eslint:recommended', + '@jdp-dev/eslint-config', '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/__tests__/validate-config.js b/packages/eslint-config-typescript/__tests__/validate-config.js index 9b32d75..0160982 100644 --- a/packages/eslint-config-typescript/__tests__/validate-config.js +++ b/packages/eslint-config-typescript/__tests__/validate-config.js @@ -8,8 +8,13 @@ test('load config in eslint to validate all rule syntax is correct', (t) => { }) const code = ` - const greet = (name: string): void => { - console.log(\`Hello, \${name}!\`) + import { getName } from 'lib' + + import { exclamationMark } from './const' + + const greet = (): void => { + const name = getName() + console.log(\`Hello, \${name}\${exclamationMark}\`) } ` diff --git a/packages/eslint-config-typescript/package.json b/packages/eslint-config-typescript/package.json index 105b331..e1b82ec 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.4", + "version": "0.0.5", "description": "My shareable ESLint config for TypeScript projects.", "private": false, "homepage": "https://github.com/john-d-pelingo/jdp-scripts", @@ -25,13 +25,13 @@ }, "peerDependencies": { "@typescript-eslint/eslint-plugin": "^4.9.0", - "@typescript-eslint/parser": "^4.9.0", "eslint": "^7.14.0", "eslint-plugin-import": "^2.22.1", "eslint-plugin-jsx-a11y": "^6.4.1", "typescript": "^4.1.2" }, "dependencies": { + "@jdp-dev/eslint-config": "^0.0.4", "@typescript-eslint/eslint-plugin": "^4.9.0", "@typescript-eslint/parser": "^4.9.0", "eslint": "^7.14.0", diff --git a/packages/eslint-config/__tests__/validate-config.js b/packages/eslint-config/__tests__/validate-config.js index 6145cd0..d3b7038 100644 --- a/packages/eslint-config/__tests__/validate-config.js +++ b/packages/eslint-config/__tests__/validate-config.js @@ -8,11 +8,16 @@ test('load config in eslint to validate all rule syntax is correct', (t) => { }) const code = ` - const greet = (name) => { - console.log(\`Hello, \${name}!\`) + const { getName } = require('lib') + + const { exclamationMark } = require('./const') + + const greet = () => { + const name = getName() + console.log(\`Hello, \${name}\${exclamationMark}\`) } - greet('John') + greet() ` const result = cli.executeOnText(code) diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index fc06573..4a2ad6d 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.4", + "version": "0.0.5", "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/package.json b/packages/prettier-config/package.json index 52df733..6dde1af 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.4", + "version": "0.0.5", "description": "My shareable Prettier config.", "private": false, "homepage": "https://github.com/john-d-pelingo/jdp-scripts",