Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

35 changes: 0 additions & 35 deletions .eslintrc.json

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
node_version: [18, 20, 22, 24]
node_version: [20, 22, 24]
include:
- os: macos-latest
node_version: 18
node_version: 20
- os: windows-latest
node_version: 18
node_version: 20
fail-fast: false
name: "Build: node-${{ matrix.node_version }}, ${{ matrix.os }}"
steps:
Expand Down
62 changes: 62 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
import { defineConfig, globalIgnores } from "eslint/config";
import typescriptEslint from "@typescript-eslint/eslint-plugin";
import globals from "globals";
import tsParser from "@typescript-eslint/parser";
import path from "node:path";
import { fileURLToPath } from "node:url";
import js from "@eslint/js";
import { FlatCompat } from "@eslint/eslintrc";

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
});

export default defineConfig([globalIgnores([
"**/dist/",
"**/node_modules",
"**/node_modules",
"**/dist",
"**/tsdown.config.ts",
"**/vitest.config.ts",
'eslint.config.mjs'
]), {
extends: compat.extends("eslint:recommended", "plugin:@typescript-eslint/recommended"),

plugins: {
"@typescript-eslint": typescriptEslint,
},

languageOptions: {
globals: {
...globals.node,
},

parser: tsParser,
ecmaVersion: 5,
sourceType: "commonjs",

parserOptions: {
project: ["./tsconfig.json"],
},
},

rules: {
"no-inner-declarations": 0,
"no-useless-escape": 1,
"@typescript-eslint/ban-ts-comment": 1,
"@typescript-eslint/no-extra-semi": 0,
"@typescript-eslint/no-shadow": 2,
"@typescript-eslint/ban-types": 0,
"@typescript-eslint/no-namespace": 0,
},
}, {
files: ["src/**/*.js", "src/**/*.ts"],

rules: {
"prefer-const": "off",
},
}]);
37 changes: 20 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
"description": "a css gradient parser",
"packageManager": "pnpm@8.7.0",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.js",
"types": "dist/index.d.ts",
"main": "dist/index.cjs",
"module": "dist/index.mjs",
"types": "dist/index.d.mts",
"type": "module",
"files": [
"dist"
],
"author": "Lynnnnnnxx<jcignorance@gmail.com>",
"scripts": {
"prepare": "simple-git-hooks",
"build": "tsup",
"build": "tsdown",
"test": "vitest",
"lint": "eslint . --ext .js,.jsx,.ts --quiet --cache",
"lint:fix": "pnpm lint --fix",
Expand All @@ -23,7 +23,7 @@
"exports": {
"./package.json": "./package.json",
".": {
"import": "./dist/index.js",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"
}
},
Expand All @@ -36,18 +36,21 @@
]
},
"devDependencies": {
"@types/node": "^20.14.10",
"@typescript-eslint/eslint-plugin": "^7.15.0",
"@typescript-eslint/parser": "^7.15.0",
"@vitest/coverage-v8": "^2.0.2",
"changelogen": "^0.5.5",
"eslint": "^8.57.0",
"lint-staged": "^14.0.1",
"simple-git-hooks": "^2.11.1",
"tsup": "^8.5.0",
"tsx": "^3.14.0",
"typescript": "^5.5.3",
"vitest": "^2.0.2"
"@eslint/eslintrc": "^3.3.3",
"@eslint/js": "^9.39.2",
"@types/node": "^24",
"@typescript-eslint/eslint-plugin": "^8.50.0",
"@typescript-eslint/parser": "^8.50.0",
"@vitest/coverage-v8": "^4.0.16",
"changelogen": "^0.6.2",
"eslint": "^9.39.2",
"globals": "^16.5.0",
"lint-staged": "^16.2.7",
"simple-git-hooks": "^2.13.1",
"tsdown": "^0.18.0",
"tsx": "^4.21.0",
"typescript": "^5.9.3",
"vitest": "^4.0.16"
},
"engines": {
"node": ">=16"
Expand Down
Loading