-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bump dependencies and use typescript for sources
breaking change: bump to eslint 8.5.x
- Loading branch information
1 parent
825b641
commit 47d819e
Showing
14 changed files
with
1,055 additions
and
568 deletions.
There are no files selected for viewing
This file contains 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 characters
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# dependencies | ||
/node_modules | ||
|
||
# build | ||
/build |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
module.exports = { | ||
root: true, | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint'], | ||
extends: [require.resolve('./index'), 'plugin:@typescript-eslint/recommended', 'prettier'], | ||
settings: { | ||
'import/resolver': { | ||
node: { | ||
extensions: ['.js', '.ts'], | ||
}, | ||
}, | ||
}, | ||
rules: { | ||
'import/extensions': [ | ||
'error', | ||
'always', | ||
{ | ||
js: 'never', | ||
ts: 'never', | ||
}, | ||
], | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
# dependencies | ||
/node_modules | ||
|
||
# build | ||
/build |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,2 @@ | ||
module.exports = { | ||
plugins: ['prettier'], | ||
extends: ['airbnb-base', 'prettier'], | ||
rules: { | ||
'prettier/prettier': 'error', | ||
curly: ['error', 'all'], | ||
'import/order': [ | ||
'error', | ||
{ | ||
alphabetize: { | ||
order: 'asc', | ||
}, | ||
pathGroups: [ | ||
{ | ||
// Put imported assets last | ||
pattern: '*.{css,gif,jpeg,png,scss,svg}', | ||
patternOptions: { | ||
matchBase: true, | ||
}, | ||
group: 'index', | ||
position: 'after', | ||
}, | ||
], | ||
}, | ||
], | ||
'import/prefer-default-export': ['warn'], | ||
'max-len': ['warn', 120], | ||
'no-console': ['error', { allow: ['warn', 'error', 'info'] }], | ||
'no-continue': 'off', | ||
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 0 }], | ||
'no-plusplus': 'off', | ||
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'], | ||
'object-curly-newline': 'off', | ||
'padding-line-between-statements': ['error', { blankLine: 'always', prev: '*', next: 'return' }], | ||
yoda: ['error', 'never', { onlyEquality: true }], | ||
}, | ||
}; | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
module.exports = require('./build/base').default; |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,40 +13,47 @@ | |
], | ||
"license": "MIT", | ||
"author": "Adrien Mille <[email protected]>", | ||
"main": "index.js", | ||
"files": [ | ||
"index.js", | ||
"react.js", | ||
"prettier.js" | ||
"prettier.js", | ||
"build" | ||
], | ||
"dependencies": { | ||
"eslint-config-airbnb": "^18.1.0", | ||
"eslint-config-airbnb-base": "^14.1.0", | ||
"eslint-config-airbnb": "^19.0.4", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-import": "^2.20.2", | ||
"eslint-plugin-jsx-a11y": "^6.2.3", | ||
"eslint-plugin-prettier": "^3.1.3", | ||
"eslint-plugin-react": "^7.20.0", | ||
"eslint-plugin-react-hooks": "^4.0.4" | ||
"eslint-plugin-import": "^2.25.3", | ||
"eslint-plugin-jsx-a11y": "^6.5.1", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"eslint-plugin-react": "^7.28.0", | ||
"eslint-plugin-react-hooks": "^4.3.0" | ||
}, | ||
"devDependencies": { | ||
"@commitlint/cli": "^12.1.1", | ||
"@commitlint/config-conventional": "^12.1.1", | ||
"@commitlint/cli": "^16.0.1", | ||
"@commitlint/config-conventional": "^16.0.0", | ||
"@types/eslint": "^8.2.1", | ||
"@types/node": "^17.0.5", | ||
"@types/prettier": "^2.4.2", | ||
"@typescript-eslint/eslint-plugin": "^5.8.1", | ||
"@typescript-eslint/parser": "^5.8.1", | ||
"commitlint-circle": "^1.0.0", | ||
"eslint": "^7.1.0", | ||
"prettier": "^2.0.5", | ||
"semantic-release": "^17.0.8" | ||
"eslint": "^8.5.0", | ||
"prettier": "^2.5.1", | ||
"semantic-release": "^18.0.1", | ||
"typescript": "^4.5.4" | ||
}, | ||
"peerDependencies": { | ||
"eslint": "^7.0.0", | ||
"prettier": "^2.0.5" | ||
}, | ||
"scripts": { | ||
"lint": "eslint --ignore-path .gitignore --ignore-pattern \"!**/.*\" .", | ||
"lint:fix": "npm run lint -- --fix", | ||
"lint": "eslint .", | ||
"lint:fix": "yarn lint --fix", | ||
"lint:commit": "commitlint", | ||
"lint:commit:ci": "commitlint-circle", | ||
"release": "semantic-release" | ||
"release": "semantic-release", | ||
"build": "yarn tsc" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
|
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,2 @@ | ||
module.exports = { | ||
trailingComma: 'es5', | ||
printWidth: 120, | ||
tabWidth: 4, | ||
singleQuote: true, | ||
arrowParens: 'avoid', | ||
}; | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
module.exports = require('./build/prettier').default; |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,2 @@ | ||
const { rules } = require('./index'); | ||
|
||
module.exports = { | ||
plugins: ['prettier', 'react-hooks'], | ||
extends: ['airbnb', 'prettier'], | ||
rules: { | ||
...rules, | ||
'jsx-a11y/anchor-is-valid': [ | ||
'error', | ||
{ | ||
components: ['Link'], | ||
specialLink: ['to'], | ||
aspects: ['noHref', 'invalidHref', 'preferButton'], | ||
}, | ||
], | ||
'jsx-quotes': ['error', 'prefer-double'], | ||
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }], | ||
'react/jsx-indent': ['error', 4], | ||
'react/jsx-indent-props': ['error', 4], | ||
'react/jsx-no-useless-fragment': 'error', | ||
'react/jsx-on-expression-per-line': 'off', | ||
'react/jsx-props-no-spreading': 'off', | ||
'react/jsx-sort-default-props': 'error', | ||
'react/jsx-sort-props': [ | ||
'error', | ||
{ | ||
reservedFirst: true, | ||
shorthandLast: true, | ||
}, | ||
], | ||
'react/require-default-props': 'off', | ||
'react/sort-prop-types': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
}, | ||
}; | ||
// eslint-disable-next-line @typescript-eslint/no-var-requires | ||
module.exports = require('./build/react').default; |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Linter } from 'eslint'; | ||
|
||
const config: Linter.Config = { | ||
plugins: ['prettier'], | ||
extends: ['airbnb-base', 'prettier'], | ||
rules: { | ||
'prettier/prettier': 'error', | ||
curly: ['error', 'all'], | ||
'import/order': [ | ||
'error', | ||
{ | ||
alphabetize: { | ||
order: 'asc', | ||
}, | ||
pathGroups: [ | ||
{ | ||
// Put imported assets last | ||
pattern: '*.{css,gif,jpeg,png,scss,svg}', | ||
patternOptions: { | ||
matchBase: true, | ||
}, | ||
group: 'index', | ||
position: 'after', | ||
}, | ||
], | ||
}, | ||
], | ||
'import/prefer-default-export': ['warn'], | ||
'max-len': ['warn', 120], | ||
'no-console': ['error', { allow: ['warn', 'error', 'info'] }], | ||
'no-continue': 'off', | ||
'no-multiple-empty-lines': ['error', { max: 1, maxBOF: 0, maxEOF: 0 }], | ||
'no-plusplus': 'off', | ||
'no-restricted-syntax': ['error', 'ForInStatement', 'LabeledStatement', 'WithStatement'], | ||
'object-curly-newline': 'off', | ||
'padding-line-between-statements': ['error', { blankLine: 'always', prev: '*', next: 'return' }], | ||
yoda: ['error', 'never', { onlyEquality: true }], | ||
}, | ||
}; | ||
|
||
export default config; |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Options } from 'prettier'; | ||
|
||
const config: Options = { | ||
trailingComma: 'es5', | ||
printWidth: 120, | ||
tabWidth: 4, | ||
singleQuote: true, | ||
arrowParens: 'avoid', | ||
}; | ||
|
||
export default config; |
This file contains 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 characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { Linter } from 'eslint'; | ||
import baseConfig from './base'; | ||
|
||
const config: Linter.Config = { | ||
plugins: ['prettier', 'react-hooks'], | ||
extends: ['airbnb', 'prettier'], | ||
rules: { | ||
...baseConfig.rules, | ||
'jsx-a11y/anchor-is-valid': [ | ||
'error', | ||
{ | ||
components: ['Link'], | ||
specialLink: ['to'], | ||
aspects: ['noHref', 'invalidHref', 'preferButton'], | ||
}, | ||
], | ||
'jsx-quotes': ['error', 'prefer-double'], | ||
'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }], | ||
'react/jsx-indent': ['error', 4], | ||
'react/jsx-indent-props': ['error', 4], | ||
'react/jsx-no-useless-fragment': 'error', | ||
'react/jsx-on-expression-per-line': 'off', | ||
'react/jsx-props-no-spreading': 'off', | ||
'react/jsx-sort-default-props': 'error', | ||
'react/jsx-sort-props': [ | ||
'error', | ||
{ | ||
reservedFirst: true, | ||
shorthandLast: true, | ||
}, | ||
], | ||
'react/require-default-props': 'off', | ||
'react/sort-prop-types': 'error', | ||
'react-hooks/exhaustive-deps': 'warn', | ||
}, | ||
}; | ||
|
||
export default config; |
Oops, something went wrong.