Skip to content

Commit

Permalink
chore(deps): update eslint dependencies to v8 (major) (#4902)
Browse files Browse the repository at this point in the history
* chore(deps): update eslint dependencies to v8

* replace typescript-eslint/ban-types with modern rules and @Stylistic

---------

Co-authored-by: cultureamp-renovate[bot] <89962466+cultureamp-renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Winter <mcwinter07@gmail.com>
  • Loading branch information
cultureamp-renovate[bot] and mcwinter07 authored Aug 12, 2024
1 parent 01b4a07 commit 6c766e9
Show file tree
Hide file tree
Showing 4 changed files with 201 additions and 131 deletions.
43 changes: 6 additions & 37 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ module.exports = {
},
plugins: [
"@typescript-eslint",
"@stylistic",
"import",
"sort-imports-es6-autofix",
"ssr-friendly",
Expand All @@ -48,35 +49,9 @@ module.exports = {
default: "array-simple",
},
],
"@typescript-eslint/ban-types": [
"error",
{
types: {
Object: {
message: "Avoid using the `Object` type. Did you mean `object`?",
},
Function: {
message:
"Avoid using the `Function` type. Prefer a specific function type, like `() => void`.",
},
// eslint-disable-next-line
Boolean: {
message: "Avoid using the `Boolean` type. Did you mean `boolean`?",
},
// eslint-disable-next-line
Number: {
message: "Avoid using the `Number` type. Did you mean `number`?",
},
// eslint-disable-next-line
String: {
message: "Avoid using the `String` type. Did you mean `string`?",
},
Symbol: {
message: "Avoid using the `Symbol` type. Did you mean `symbol`?",
},
},
},
],
"@typescript-eslint/no-empty-object-type": "error",
"@typescript-eslint/no-unsafe-function-type": "error",
"@typescript-eslint/no-wrapper-object-types": "error",
"@typescript-eslint/class-name-casing": "off",
"@typescript-eslint/consistent-type-assertions": "off",
"@typescript-eslint/consistent-type-definitions": "off",
Expand Down Expand Up @@ -115,13 +90,6 @@ module.exports = {
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/quotes": [
"error",
"double",
{
avoidEscape: true,
},
],
"@typescript-eslint/semi": ["off", null],
"@typescript-eslint/triple-slash-reference": [
"error",
Expand All @@ -131,8 +99,9 @@ module.exports = {
lib: "always",
},
],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unified-signatures": "error",
"@stylistic/quotes": ["error", "double", { avoidEscape: true }],
"@stylistic/type-annotation-spacing": "error",
"arrow-body-style": "warn",
"arrow-parens": ["error", "as-needed"],
"brace-style": ["error", "1tbs"],
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"dependencies": {
"@kaizen/design-tokens": "workspace:*",
"@kaizen/tailwind": "workspace:*",
"@stylistic/eslint-plugin": "^2.6.2",
"classnames": "^2.5.1",
"identity-obj-proxy": "^3.0.0",
"lodash.isempty": "^4.4.0",
Expand Down Expand Up @@ -87,8 +88,8 @@
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react-highlight": "^0.12.8",
"@typescript-eslint/eslint-plugin": "^7.18.0",
"@typescript-eslint/parser": "^7.18.0",
"@typescript-eslint/eslint-plugin": "^8.0.1",
"@typescript-eslint/parser": "^8.0.1",
"axe-playwright": "^2.0.1",
"chromatic": "^11.7.0",
"color-string": "^1.9.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export const VideoPlayer = ({
* https://developer.mozilla.org/en-US/docs/Web/Media/Autoplay_guide#autoplay_availability
*/
})
} catch (e) {
} catch {
/**
* Older browsers will raise a synchronous error because their first implementation
* of `.play` was not a promise.
Expand Down
Loading

0 comments on commit 6c766e9

Please sign in to comment.