Skip to content

Commit bf79ad8

Browse files
authored
chore: use oxlint instead of eslint (#503)
* chore: use oxlint instead of eslint * style: oxlint-disable comments
1 parent 1f90dd0 commit bf79ad8

20 files changed

Lines changed: 128 additions & 490 deletions

bun.lock

Lines changed: 86 additions & 414 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dprint.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
],
2222
"plugins": [
2323
"https://plugins.dprint.dev/typescript-0.95.15.wasm",
24-
"https://plugins.dprint.dev/json-0.19.1.wasm"
24+
"https://plugins.dprint.dev/json-0.21.3.wasm"
2525
]
2626
}

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
},
3636
"devDependencies": {
3737
"typescript": "catalog:",
38-
"dprint": "0.53.0",
39-
"eslint": "9.39.1",
40-
"eslint-config-codemask": "2.2.1",
38+
"dprint": "0.54.0",
39+
"oxlint": "1.61.0",
40+
"oxlint-tsgolint": "0.21.1",
4141
"husky": "9.1.7",
42-
"turbo": "2.8.20"
42+
"turbo": "2.9.6"
4343
},
4444
"packageManager": "bun@1.3.10",
4545
"trustedDependencies": [

packages/uniwind/.oxlintrc.json

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"options": {
3+
"typeAware": true
4+
},
5+
"rules": {
6+
"unicorn/no-empty-file": "off",
7+
"typescript/strict-boolean-expressions": [
8+
"error",
9+
{
10+
"allowAny": true,
11+
"allowNullableBoolean": true,
12+
"allowNullableEnum": true
13+
}
14+
],
15+
"typescript/no-implied-eval": "off"
16+
},
17+
"ignorePatterns": [
18+
"build.config.ts",
19+
"types.d.ts",
20+
"no-types.d.ts",
21+
"src/metro/index.d.ts",
22+
"src/vite/index.d.ts",
23+
"dist",
24+
"specs",
25+
"jest.config.js",
26+
"tests",
27+
"babel.config.cjs"
28+
]
29+
}

packages/uniwind/eslint.config.ts

Lines changed: 0 additions & 43 deletions
This file was deleted.

packages/uniwind/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
"precommit": "bun lint",
1313
"build": "unbuild",
1414
"check:typescript": "tsc --noEmit",
15-
"lint": "eslint src",
16-
"lint:fix": "eslint src --fix",
15+
"lint": "oxlint src",
16+
"lint:fix": "oxlint src --fix",
1717
"format": "dprint fmt",
1818
"prepublishOnly": "bun run build",
1919
"circular:check": "dpdm --no-warning --no-tree -T --exit-code circular:1 'src/**/*.ts' 'src/**/*.tsx'",

packages/uniwind/src/core/config/config.common.ts

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { CSSVariables, GenerateStyleSheetsCallback, ThemeName } from '../types'
55

66
const SYSTEM_THEME = 'system' as const
77
// Platform.constants is not defined in RNW
8-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
98
const RN_VERSION = Platform.constants?.reactNativeVersion?.minor ?? 0
109
const UNSPECIFIED_THEME = RN_VERSION >= 82 ? 'unspecified' : undefined
1110

@@ -18,7 +17,6 @@ export class UniwindConfigBuilder {
1817
Appearance.addChangeListener(event => {
1918
const colorScheme = event.colorScheme === 'unspecified'
2019
? ColorScheme.Light
21-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
2220
: event.colorScheme ?? ColorScheme.Light
2321
const prevTheme = this.#currentTheme
2422

@@ -52,7 +50,7 @@ export class UniwindConfigBuilder {
5250
return colorScheme ?? ColorScheme.Light
5351
}
5452

55-
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
53+
// oxlint-disable-next-line typescript/no-redundant-type-constituents
5654
setTheme(theme: ThemeName | typeof SYSTEM_THEME) {
5755
const prevTheme = this.#currentTheme
5856
const prevHasAdaptiveThemes = this.#hasAdaptiveThemes
@@ -98,15 +96,12 @@ export class UniwindConfigBuilder {
9896
}
9997
}
10098

101-
updateCSSVariables(theme: ThemeName, variables: CSSVariables) {
99+
updateCSSVariables(_: ThemeName, __: CSSVariables) {
102100
// noop
103-
theme
104-
variables
105101
}
106102

107-
updateInsets(insets: Insets) {
103+
updateInsets(_: Insets) {
108104
// noop
109-
insets
110105
}
111106

112107
protected __reinit(_: GenerateStyleSheetsCallback, themes: Array<string>) {

packages/uniwind/src/core/logger.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* eslint-disable no-console */
2-
31
export class Logger {
42
static log(message: string) {
53
console.log(`Uniwind - ${message}`)

packages/uniwind/src/core/native/parsers/transforms.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable max-depth */
21
const transforms = [
32
'translateX',
43
'translateY',

packages/uniwind/src/core/native/store.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable max-depth */
21
import { Dimensions, Platform } from 'react-native'
32
import { Platform as UniwindPlatform, UNIWIND_PLATFORM_VARIABLES, UNIWIND_THEME_VARIABLES } from '../../common/consts'
43
import { Orientation, StyleDependency } from '../../types'

0 commit comments

Comments
 (0)