Skip to content

Commit

Permalink
chore: update eslint
Browse files Browse the repository at this point in the history
  • Loading branch information
nperez0111 committed Dec 31, 2024
1 parent 483f743 commit 44cae5b
Show file tree
Hide file tree
Showing 25 changed files with 159 additions and 182 deletions.
3 changes: 1 addition & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,14 +105,13 @@ module.exports = {
'lines-between-class-members': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'@typescript-eslint/lines-between-class-members': ['error'],
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/explicit-module-boundary-type': 'off',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/ban-ts-comment': 'off',
'@typescript-eslint/ban-types': 'off',
'@typescript-eslint/comma-dangle': ['error', 'always-multiline'],
'@typescript-eslint/explicit-module-boundary-types': 'off',
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface AnnotationPluginOptions {
HTMLAttributes: {
[key: string]: any
}
onUpdate: (items: AnnotationItem[]) => {}
onUpdate: (items: AnnotationItem[]) => object
map: Y.Map<any>
instance: string
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface AnnotationOptions {
/**
* An event listener which receives annotations for the current selection.
*/
onUpdate: (items: any[]) => {},
onUpdate: (items: any[]) => object,
/**
* An initialized Y.js document.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type CustomStorage = {
foo: number,
}

export const CustomExtension = Extension.create<{}, CustomStorage>({
export const CustomExtension = Extension.create<any, CustomStorage>({
name: 'custom',

addStorage() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ type CustomStorage = {
foo: number,
}

export const CustomExtension = Extension.create<{}, CustomStorage>({
export const CustomExtension = Extension.create<any, CustomStorage>({
name: 'custom',

addStorage() {
Expand Down
2 changes: 2 additions & 0 deletions demos/src/Experiments/Linter/Vue/extension/LinterPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export interface Result {
message: string
from: number
to: number
// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
fix?: Function
}

Expand All @@ -16,6 +17,7 @@ export default class LinterPlugin {
this.doc = doc
}

// eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
record(message: string, from: number, to: number, fix?: Function) {
this.results.push({
message,
Expand Down
4 changes: 2 additions & 2 deletions demos/src/Marks/Link/React/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default () => {

// all checks have passed
return true
} catch (error) {
} catch {
return false
}
},
Expand All @@ -70,7 +70,7 @@ export default () => {
const domain = parsedUrl.hostname

return !disallowedDomains.includes(domain)
} catch (error) {
} catch {
return false
}
},
Expand Down
Loading

0 comments on commit 44cae5b

Please sign in to comment.