Skip to content

Commit

Permalink
feat: extend eslint-config
Browse files Browse the repository at this point in the history
  • Loading branch information
john-d-pelingo committed Dec 1, 2020
1 parent 5626be1 commit 31dc6bb
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 25 deletions.
25 changes: 2 additions & 23 deletions packages/eslint-config-typescript/.eslintrc.js
Expand Up @@ -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'],
Expand Down
Expand Up @@ -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}\`)
}
`

Expand Down
1 change: 1 addition & 0 deletions packages/eslint-config-typescript/package.json
Expand Up @@ -32,6 +32,7 @@
"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",
Expand Down

0 comments on commit 31dc6bb

Please sign in to comment.