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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ jobs:
run: pnpm run build
- name: Test
working-directory: integration-test
run: pnpm exec eslint src/sample.ts --debug
run: pnpm exec oxlint src/sample.ts --debug=timings
96 changes: 96 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
{
"plugins": ["typescript"],
"categories": {
"correctness": "error"
},
"env": {
"builtin": true,
"node": true
},
"ignorePatterns": ["dist/", "coverage/", "integration-test/"],
"rules": {
"unicorn/prefer-node-protocol": "warn",
"constructor-super": "error",
"for-direction": "error",
"getter-return": "error",
"no-async-promise-executor": "error",
"no-case-declarations": "error",
"no-class-assign": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-const-assign": "error",
"no-constant-binary-expression": "error",
"no-constant-condition": "error",
"no-control-regex": "error",
"no-debugger": "error",
"no-delete-var": "error",
"no-dupe-class-members": "error",
"no-dupe-else-if": "error",
"no-dupe-keys": "error",
"no-duplicate-case": "error",
"no-empty": ["error", { "allowEmptyCatch": true }],
"no-empty-character-class": "error",
"no-empty-pattern": ["error", { "allowObjectPatternsAsParameters": true }],
"no-empty-static-block": "error",
"no-ex-assign": "error",
"no-extra-boolean-cast": "error",
"no-fallthrough": "error",
"no-func-assign": "error",
"no-global-assign": "error",
"no-import-assign": "error",
"no-invalid-regexp": "error",
"no-irregular-whitespace": "error",
"no-loss-of-precision": "error",
"no-misleading-character-class": "error",
"no-new-native-nonconstructor": "error",
"no-nonoctal-decimal-escape": "error",
"no-obj-calls": "error",
"no-prototype-builtins": "error",
"no-redeclare": "error",
"no-regex-spaces": "error",
"no-self-assign": "error",
"no-setter-return": "error",
"no-shadow-restricted-names": "error",
"no-sparse-arrays": "error",
"no-this-before-super": "error",
"no-unassigned-vars": "error",
"no-unexpected-multiline": "error",
"no-unreachable": "error",
"no-unsafe-finally": "error",
"no-unsafe-negation": "error",
"no-unsafe-optional-chaining": "error",
"no-unused-labels": "error",
"no-unused-private-class-members": "error",
"no-unused-vars": "error",
"no-useless-backreference": "error",
"no-useless-catch": "error",
"no-useless-escape": "error",
"no-with": "error",
"preserve-caught-error": "error",
"require-yield": "error",
"use-isnan": "error",
"valid-typeof": "error",
"no-array-constructor": "error",
"no-unused-expressions": "error",
"curly": ["warn", "multi-or-nest", "consistent"],
"no-duplicate-imports": "warn",
"no-shadow": "warn",
"typescript/ban-ts-comment": "error",
"typescript/no-duplicate-enum-values": "error",
"typescript/no-empty-object-type": "error",
"typescript/no-explicit-any": "error",
"typescript/no-extra-non-null-assertion": "error",
"typescript/no-misused-new": "error",
"typescript/no-namespace": "error",
"typescript/no-non-null-asserted-optional-chain": "error",
"typescript/no-require-imports": "error",
"typescript/no-this-alias": "error",
"typescript/no-unnecessary-type-constraint": "error",
"typescript/no-unsafe-declaration-merging": "error",
"typescript/no-unsafe-function-type": "error",
"typescript/no-wrapper-object-types": "error",
"typescript/prefer-as-const": "error",
"typescript/prefer-namespace-keyword": "error",
"typescript/triple-slash-reference": "error"
}
}
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@

## Version 3

### Version 3.0.0
### v3.1.0

- Supporting OxLint `^1.76.0`:
- It's ESLint-compatible but supports TypeScript out of the box;
- All peer dependencies are now optional: `typescript-eslint` is no longer required.

### v3.0.0

- Supported Node.js versions: `^22.19.0 || ^24.11.0 || ^26.0.0`.

Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ import fancyFn from "unlisted-module"; // Error: Importing unlisted-module is no

## Requirements

- `eslint@^9.0.0`
- `typescript-eslint@^8.0.0`
- `eslint@^10.0.0`
- `typescript-eslint@^8.56.0`
- Node.js `^22.19.0 || ^24.11.0 || ^26.0.0`
- Either:
- `eslint@^9.0.0` and `typescript-eslint@^8.0.0`
- `eslint@^10.0.0` and `typescript-eslint@^8.56.0`
- `oxlint@^1.76.0`

## Installation

Expand Down
17 changes: 17 additions & 0 deletions integration-test/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"plugins": ["typescript"],
"jsPlugins": [
{ "name": "allowed", "specifier": "eslint-plugin-allowed-dependencies" }
],
"categories": {
"correctness": "error"
},
"env": {
"builtin": true,
"node": true
},
"ignorePatterns": [],
"rules": {
"allowed/dependencies": ["error", { "typeOnly": ["typescript"] }]
}
}
20 changes: 0 additions & 20 deletions integration-test/eslint.config.js

This file was deleted.

4 changes: 0 additions & 4 deletions integration-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
"version": "0.0.1",
"type": "module",
"devDependencies": {
"@eslint/js": "^10",
"eslint": "^10",
"typescript-eslint": "^8",
"typescript": "^6.0.0",
"eslint-plugin-allowed-dependencies": "link:.."
}
}
21 changes: 16 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-allowed-dependencies",
"version": "3.0.0",
"version": "3.1.0-beta.0",
"description": "ESLint plugin Allowed Dependencies",
"keywords": [
"dependencies",
Expand Down Expand Up @@ -43,34 +43,45 @@
},
"scripts": {
"build": "tsdown",
"lint": "oxfmt --check",
"lint": "oxlint --disable-nested-config && oxfmt --check",
"pretest": "tsc --noEmit",
"test": "vitest run",
"mdfix": "oxfmt *.md",
"prepublishOnly": "pnpm run lint && pnpm run test && pnpm run build"
},
"dependencies": {
"@oxlint/plugins": "^1.76.0",
"ramda": "^0.32.0"
},
"devDependencies": {
"@arethetypeswrong/core": "^0.18.2",
"@tsconfig/node22": "^22.0.5",
"@types/node": "^22.0.0",
"@types/ramda": "^0.32.0",
"@typescript-eslint/rule-tester": "^8.56.0",
"@vitest/coverage-v8": "^4.1.10",
"eslint": "^10.0.0",
"json-schema-to-ts": "^3.1.1",
"oxfmt": "^0.62.0",
"oxlint": "^1.76.0",
"tsdown": "^0.22.0",
"typescript": "^6.0.2",
"typescript-eslint": "^8.56.0",
"vitest": "^4.1.10"
},
"peerDependencies": {
"eslint": "^9.0.0 || ^10.0.0",
"oxlint": "^1.76.0",
"typescript-eslint": "^8.0.0"
},
"peerDependenciesMeta": {
"eslint": {
"optional": true
},
"typescript-eslint": {
"optional": true
},
"oxlint": {
"optional": true
}
},
"engines": {
"node": "^22.19.0 || ^24.11.0 || ^26.0.0"
},
Expand Down
Loading