Skip to content

Commit

Permalink
chore: upgrade eslint (#768)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann authored Nov 27, 2024
1 parent 51c1dd5 commit c98d7b1
Show file tree
Hide file tree
Showing 18 changed files with 204 additions and 181 deletions.
3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

10 changes: 10 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import js from '@eslint/js'
import ts from 'typescript-eslint'

export default ts.config(
{
ignores: ['examples/**/*', '**/dist', '**/node_modules']
},
js.configs.recommended,
ts.configs.recommended
)
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "imagetools",
"license": "MIT",
"private": true,
"type": "module",
"scripts": {
"ci:version": "pnpm changeset version",
"ci:publish": "pnpm build && pnpm publish -r",
Expand All @@ -14,18 +15,17 @@
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@eslint/js": "^9.15.0",
"@rollup/plugin-typescript": "^12.0.0",
"@typescript-eslint/eslint-plugin": "^8.16.0",
"@typescript-eslint/parser": "^8.16.0",
"cross-env": "^7.0.3",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.0.0",
"eslint": "^9.15.0",
"prettier": "^3.0.3",
"rollup": "^4.22.4",
"tslib": "^2.6.1",
"typedoc": "^0.26.11",
"typedoc-plugin-markdown": "^4.2.10",
"typescript": "^5.1.6"
"typescript": "^5.1.6",
"typescript-eslint": "^8.16.0"
},
"commitlint": {
"extends": [
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/transforms/__tests__/blur.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { blur } from '../blur'
import { TransformFactoryContext } from '../../types'
import { applyTransforms } from '../../index'
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/transforms/__tests__/flatten.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { flatten } from '../flatten'
import { TransformFactoryContext } from '../../types'
import { applyTransforms } from '../../index'
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/transforms/__tests__/flip.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { TransformFactoryContext } from '../../types'
import { flip } from '../flip'
import { applyTransforms } from '../../index'
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/transforms/__tests__/flop.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { TransformFactoryContext } from '../../types'
import { flop } from '../flop'
import { applyTransforms } from '../../index'
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/transforms/__tests__/format.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { format } from '../format'
import { applyTransforms } from '../../index'
import { consoleLogger } from '../../lib/logger'
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/transforms/__tests__/grayscale.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { grayscale } from '../grayscale'
import { TransformFactoryContext } from '../../types'
import { applyTransforms } from '../../index'
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/transforms/__tests__/hsb.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { hsb } from '../hsb'
import { TransformFactoryContext } from '../../types'
import { applyTransforms } from '../../index'
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/transforms/__tests__/invert.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { invert } from '../invert'
import { TransformFactoryContext } from '../../types'
import { applyTransforms } from '../../index'
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/transforms/__tests__/median.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { median } from '../median'
import { TransformFactoryContext } from '../../types'
import { applyTransforms } from '../../index'
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/transforms/__tests__/normalize.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { normalize } from '../normalize'
import { TransformFactoryContext } from '../../types'
import { applyTransforms } from '../../index'
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/transforms/__tests__/position.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ describe('position', () => {
})

describe('shorthands', () => {
// eslint-disable-next-line @typescript-eslint/no-empty-function
test('invalid', () => {})

test('valid', () => {
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/transforms/__tests__/rotate.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { rotate } from '../rotate'
import { TransformFactoryContext } from '../../types'
import { applyTransforms } from '../../index'
Expand Down
1 change: 0 additions & 1 deletion packages/core/src/transforms/__tests__/tint.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-non-null-assertion */
import { tint } from '../tint'
import { TransformFactoryContext } from '../../types'
import { applyTransforms } from '../../index'
Expand Down
2 changes: 1 addition & 1 deletion packages/vite/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export function imagetools(userOptions: Partial<VitePluginOptions> = {}): Plugin

return dataToEsm(await outputFormat(outputMetadatas), {
namedExports: pluginOptions.namedExports ?? viteConfig.json?.namedExports ?? true,
compact: !!viteConfig.build.minify ?? false,
compact: !!viteConfig.build.minify,
preferConst: true
})
},
Expand Down
Loading

0 comments on commit c98d7b1

Please sign in to comment.