Skip to content

Commit 0f55612

Browse files
authored
chore: upgrade lint (#12)
1 parent a1fe4c7 commit 0f55612

7 files changed

+43
-12
lines changed

.eslintrc.json

+4-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22
"env": {
33
"node": true
44
},
5-
"extends": [
6-
"eslint:recommended",
7-
"plugin:@typescript-eslint/recommended"
8-
],
95
"parser": "@typescript-eslint/parser",
10-
"plugins": ["@typescript-eslint"],
6+
"plugins": ["@stylistic/ts"],
117
"root": true,
128
"rules": {
13-
"semi": "off",
9+
"max-len": ["error", { "code": 120 }],
10+
"semi": ["error", "never"],
11+
"quotes": ["error", "single"],
1412
"@typescript-eslint/no-explicit-any": "off"
1513
}
1614
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"unplugin": "^1.7.1"
7070
},
7171
"devDependencies": {
72+
"@stylistic/eslint-plugin-ts": "^1.6.2",
7273
"@types/node": "^20.10.5",
7374
"@typescript-eslint/eslint-plugin": "^6.16.0",
7475
"@typescript-eslint/parser": "^6.16.0",

pnpm-lock.yaml

+32
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/rollup.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import { isDevelopment } from './core/constants'
22

33
export default (options?) => {
44
if (isDevelopment || options?.dev) {
5-
throw new Error(`If you want to use this plugin through rollup, please use "@stylexjs/rollup-plugin" instead`)
5+
throw new Error('If you want to use this plugin through rollup, please use "@stylexjs/rollup-plugin" instead')
66
}
77
}

src/types.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export type StylexOptions = {
1010
classNamePrefix?: string
1111
useCSSLayers?: boolean
1212
unstable_moduleResolution?: {
13-
type: "commonjs" | "haste"
13+
type: 'commonjs' | 'haste'
1414
rootDir: string
1515
}
1616
babelConfig?: BabelConfig
@@ -21,6 +21,6 @@ export type StylexOptions = {
2121
export type UnpluginStylexOptions = {
2222
compiler?: string
2323
dev?: boolean
24-
enforce?: "post" | "pre"
24+
enforce?: 'post' | 'pre'
2525
stylex?: StylexOptions
2626
}

src/webpack.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import { isDevelopment } from './core/constants'
22

33
export default (options?) => {
44
if (isDevelopment || options?.dev) {
5-
throw new Error(`If you want to use this plugin through webpack, please use "@stylexjs/webpack-plugin" instead`)
5+
throw new Error('If you want to use this plugin through webpack, please use "@stylexjs/webpack-plugin" instead')
66
}
77
}

vitest.config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ export default defineConfig({
44
test: {
55
coverage: {
66
exclude: [
7-
"examples/**",
8-
"test/**"
7+
'examples/**',
8+
'test/**'
99
],
1010
reporter: ['text', 'json', 'html'],
1111
},

0 commit comments

Comments
 (0)