Skip to content

Commit

Permalink
chore: bump ESLint dependencies (#2063)
Browse files Browse the repository at this point in the history
Mainly, bump ESLint to v7, which figures out extensions from
`overrides`, so we no longer need to pass `--ext`.
  • Loading branch information
silvenon committed Aug 3, 2020
1 parent 95e3de3 commit 56b9c51
Show file tree
Hide file tree
Showing 8 changed files with 164 additions and 87 deletions.
14 changes: 10 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
// @noflow
module.exports = {
root: true,
reportUnusedDisableDirectives: true,
overrides: [
{
files: '*.{js,js.flow}',
extends: ['./config/eslintJS'],
files: "*.js",
extends: ["./config/eslintJS"],
},
{
files: '*.ts',
extends: ['./config/eslintTS'],
files: "*.js.flow",
extends: ["./config/eslintJS"],
},
{
files: "*.ts",
extends: ["./config/eslintTS"],
},
],
};
1 change: 0 additions & 1 deletion config/eslintJS.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ module.exports = {
"prettier/react",
],
plugins: ["import", "flowtype", "prettier", "jest", "react-hooks"],
reportUnusedDisableDirectives: true,
rules: {
"no-console": ["error", { allow: ["warn", "error"] }],
"prettier/prettier": "error",
Expand Down
1 change: 0 additions & 1 deletion config/eslintTS.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @noflow
module.exports = {
parser: "@typescript-eslint/parser",
extends: [
"plugin:react/recommended",
"plugin:@typescript-eslint/recommended",
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"prepare": "npm run build",
"prettier:test": "prettier --check '**/*.md'",
"watch": "concurrently \"npm run build:lib -- --watch\" \"npm run build:module -- --watch\"",
"eslint:check": "eslint . --ext .js,.js.flow,.ts --report-unused-disable-directives",
"eslint:check": "eslint . --report-unused-disable-directives",
"flow:check": "flow check",
"test": "jest --config=jest.json",
"test-ci": "yarn flow:check && yarn eslint && yarn test --ci --maxWorkers=2 && yarn prettier:test",
Expand Down Expand Up @@ -121,8 +121,8 @@
"@storybook/storybook-deployer": "^2.8.6",
"@svgr/core": "^2.0.0",
"@types/styled-components": "^4.4.2",
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"@typescript-eslint/eslint-plugin": "^3.7.1",
"@typescript-eslint/parser": "^3.7.1",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.1.0",
Expand All @@ -137,12 +137,12 @@
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.2",
"enzyme-to-json": "^3.5.0",
"eslint": "^6.8.0",
"eslint": "^7.5.0",
"eslint-config-airbnb": "^18.2.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-flowtype": "^4.7.0",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-jest": "^23.19.0",
"eslint-plugin-jest": "^23.20.0",
"eslint-plugin-jsx-a11y": "^6.3.1",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-react": "^7.20.5",
Expand Down
1 change: 1 addition & 0 deletions src/Modal/ModalContext.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export interface Props {
}

export const ModalContext: React.Context<Props>;
// eslint-disable-next-line @typescript-eslint/ban-types
export type WithModalContextType = <Config extends {}>(
arg0: React.Component<Config>,
) => React.Component<Config>;
1 change: 1 addition & 0 deletions src/SkipLink/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ declare module "@kiwicom/orbit-components/lib/SkipLink";
interface Action {
readonly name: string;
readonly href?: string;
// eslint-disable-next-line @typescript-eslint/ban-types
readonly onClick?: () => {};
}

Expand Down
1 change: 1 addition & 0 deletions src/SkipNavigation/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ declare module "@kiwicom/orbit-components/lib/SkipNavigation";
interface Action {
readonly name?: string;
readonly link?: string;
// eslint-disable-next-line @typescript-eslint/ban-types
readonly onClick?: () => {};
}

Expand Down
Loading

0 comments on commit 56b9c51

Please sign in to comment.