Skip to content

Commit 54d0c95

Browse files
authored
chore!: bump node requirement, enable more lint rules (#54)
1 parent 4d03118 commit 54d0c95

File tree

94 files changed

+1517
-1567
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+1517
-1567
lines changed

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"changelog": [
44
"@changesets/changelog-github",
55
{
6-
"repo": "un-es/eslint-plugin-import-x"
6+
"repo": "un-ts/eslint-plugin-import-x"
77
}
88
],
99
"commit": false,

.changeset/empty-worms-lick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-import-x": minor
3+
---
4+
5+
chore!: bump node requirement (>=16), enable more lint rules

.codesandbox/ci.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"node": "18",
3+
"installCommand": "codesandbox:install",
34
"sandboxes": []
45
}

.eslintrc.js

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
/**
22
* @type {import('eslint').Linter.Config}
33
*/
4+
// eslint-disable-next-line unicorn/prefer-module
45
module.exports = {
56
root: true,
6-
plugins: ['eslint-plugin', 'import-x'],
77
extends: [
88
'eslint:recommended',
99
'plugin:@typescript-eslint/recommended',
1010
'plugin:eslint-plugin/recommended',
1111
'plugin:import-x/recommended',
12+
'plugin:n/recommended',
13+
'plugin:unicorn/recommended',
1214
'plugin:prettier/recommended',
1315
],
1416
env: {
@@ -36,6 +38,16 @@ module.exports = {
3638
],
3739
'eslint-plugin/require-meta-schema': 'error',
3840
'eslint-plugin/require-meta-type': 'error',
41+
'n/no-extraneous-require': 'off',
42+
'n/no-missing-import': 'off',
43+
'n/no-missing-require': 'off',
44+
'n/no-unsupported-features/es-syntax': 'off',
45+
'unicorn/no-array-callback-reference': 'off',
46+
'unicorn/no-array-reduce': 'off',
47+
'unicorn/no-null': 'off',
48+
'unicorn/prefer-module': 'off',
49+
'unicorn/prevent-abbreviations': 'off',
50+
'unicorn/prefer-at': 'off',
3951

4052
// dog fooding
4153
'import-x/no-extraneous-dependencies': [
@@ -68,6 +80,13 @@ module.exports = {
6880
fixStyle: 'inline-type-imports',
6981
},
7082
],
83+
'@typescript-eslint/no-unused-vars': [
84+
'error',
85+
{
86+
argsIgnorePattern: '^_',
87+
varsIgnorePattern: '^_',
88+
},
89+
],
7190
'import-x/consistent-type-specifier-style': 'error',
7291
'import-x/order': [
7392
'error',

CHANGELOG.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,44 @@
44

55
### Patch Changes
66

7-
- [#51](https://github.com/un-es/eslint-plugin-import-x/pull/51) [`f4ca4b5`](https://github.com/un-es/eslint-plugin-import-x/commit/f4ca4b503389ef6aa35bee50452042eee13cf66f) Thanks [@JounQin](https://github.com/JounQin)! - refactor: migrate all remaining rules
7+
- [#51](https://github.com/un-ts/eslint-plugin-import-x/pull/51) [`f4ca4b5`](https://github.com/un-ts/eslint-plugin-import-x/commit/f4ca4b503389ef6aa35bee50452042eee13cf66f) Thanks [@JounQin](https://github.com/JounQin)! - refactor: migrate all remaining rules
88

9-
- [#48](https://github.com/un-es/eslint-plugin-import-x/pull/48) [`3d7a551`](https://github.com/un-es/eslint-plugin-import-x/commit/3d7a551de617188079bf99c9478158adace02fac) Thanks [@JounQin](https://github.com/JounQin)! - refactor: migrate more rules
9+
- [#48](https://github.com/un-ts/eslint-plugin-import-x/pull/48) [`3d7a551`](https://github.com/un-ts/eslint-plugin-import-x/commit/3d7a551de617188079bf99c9478158adace02fac) Thanks [@JounQin](https://github.com/JounQin)! - refactor: migrate more rules
1010

11-
- [#50](https://github.com/un-es/eslint-plugin-import-x/pull/50) [`de896f4`](https://github.com/un-es/eslint-plugin-import-x/commit/de896f46b1e3d3bcc51015d2e0269e6ae80dc87d) Thanks [@JounQin](https://github.com/JounQin)! - refactor: migrate several rules
11+
- [#50](https://github.com/un-ts/eslint-plugin-import-x/pull/50) [`de896f4`](https://github.com/un-ts/eslint-plugin-import-x/commit/de896f46b1e3d3bcc51015d2e0269e6ae80dc87d) Thanks [@JounQin](https://github.com/JounQin)! - refactor: migrate several rules
1212

1313
## 0.3.0
1414

1515
### Minor Changes
1616

17-
- [#42](https://github.com/un-es/eslint-plugin-import-x/pull/42) [`6ee88e8`](https://github.com/un-es/eslint-plugin-import-x/commit/6ee88e8b648e6d5b434a5d56d8c04ad41aa3d491) Thanks [@JounQin](https://github.com/JounQin)! - feat!: start TypeScript migration
17+
- [#42](https://github.com/un-ts/eslint-plugin-import-x/pull/42) [`6ee88e8`](https://github.com/un-ts/eslint-plugin-import-x/commit/6ee88e8b648e6d5b434a5d56d8c04ad41aa3d491) Thanks [@JounQin](https://github.com/JounQin)! - feat!: start TypeScript migration
1818

1919
### Patch Changes
2020

21-
- [#44](https://github.com/un-es/eslint-plugin-import-x/pull/44) [`bbf46c3`](https://github.com/un-es/eslint-plugin-import-x/commit/bbf46c302f4f2632e1d4b76c52101c8ed8c469c2) Thanks [@JounQin](https://github.com/JounQin)! - feat: migrate named rule and related usage
21+
- [#44](https://github.com/un-ts/eslint-plugin-import-x/pull/44) [`bbf46c3`](https://github.com/un-ts/eslint-plugin-import-x/commit/bbf46c302f4f2632e1d4b76c52101c8ed8c469c2) Thanks [@JounQin](https://github.com/JounQin)! - feat: migrate named rule and related usage
2222

23-
- [#45](https://github.com/un-es/eslint-plugin-import-x/pull/45) [`dc3d48b`](https://github.com/un-es/eslint-plugin-import-x/commit/dc3d48bb1893d5094c68ed4189029fabe8fe8ef3) Thanks [@JounQin](https://github.com/JounQin)! - refactor: migrate core utils
23+
- [#45](https://github.com/un-ts/eslint-plugin-import-x/pull/45) [`dc3d48b`](https://github.com/un-ts/eslint-plugin-import-x/commit/dc3d48bb1893d5094c68ed4189029fabe8fe8ef3) Thanks [@JounQin](https://github.com/JounQin)! - refactor: migrate core utils
2424

2525
## 0.2.0
2626

2727
### Minor Changes
2828

29-
- [#38](https://github.com/un-es/eslint-plugin-import-x/pull/38) [`3a5dab4`](https://github.com/un-es/eslint-plugin-import-x/commit/3a5dab4b8f79e013016ab51d13b1f220d47fc06b) Thanks [@JounQin](https://github.com/JounQin)! - chore!: bump all upgradable (dev)Dependencies
29+
- [#38](https://github.com/un-ts/eslint-plugin-import-x/pull/38) [`3a5dab4`](https://github.com/un-ts/eslint-plugin-import-x/commit/3a5dab4b8f79e013016ab51d13b1f220d47fc06b) Thanks [@JounQin](https://github.com/JounQin)! - chore!: bump all upgradable (dev)Dependencies
3030

31-
- [#36](https://github.com/un-es/eslint-plugin-import-x/pull/36) [`49e3cd2`](https://github.com/un-es/eslint-plugin-import-x/commit/49e3cd2b1a1448be4db0e645493b5363f9761026) Thanks [@JounQin](https://github.com/JounQin)! - feat!: replace tsconfig-paths with get-tsconfig
31+
- [#36](https://github.com/un-ts/eslint-plugin-import-x/pull/36) [`49e3cd2`](https://github.com/un-ts/eslint-plugin-import-x/commit/49e3cd2b1a1448be4db0e645493b5363f9761026) Thanks [@JounQin](https://github.com/JounQin)! - feat!: replace tsconfig-paths with get-tsconfig
3232

3333
### Patch Changes
3434

35-
- [#39](https://github.com/un-es/eslint-plugin-import-x/pull/39) [`d0d36de`](https://github.com/un-es/eslint-plugin-import-x/commit/d0d36de6ff4e7a118472eed41c94cef862d1f372) Thanks [@JounQin](https://github.com/JounQin)! - docs: update repository url
35+
- [#39](https://github.com/un-ts/eslint-plugin-import-x/pull/39) [`d0d36de`](https://github.com/un-ts/eslint-plugin-import-x/commit/d0d36de6ff4e7a118472eed41c94cef862d1f372) Thanks [@JounQin](https://github.com/JounQin)! - docs: update repository url
3636

3737
## 0.1.1
3838

3939
### Patch Changes
4040

41-
- [#34](https://github.com/un-es/eslint-plugin-import-x/pull/34) [`a615826`](https://github.com/un-es/eslint-plugin-import-x/commit/a6158264ce3cba829fe2de51c42a5d5ea042440d) Thanks [@JounQin](https://github.com/JounQin)! - chore: cleanup npm package content
41+
- [#34](https://github.com/un-ts/eslint-plugin-import-x/pull/34) [`a615826`](https://github.com/un-ts/eslint-plugin-import-x/commit/a6158264ce3cba829fe2de51c42a5d5ea042440d) Thanks [@JounQin](https://github.com/JounQin)! - chore: cleanup npm package content
4242

4343
## 0.1.0
4444

4545
### Minor Changes
4646

47-
- [#32](https://github.com/un-es/eslint-plugin-import-x/pull/32) [`46ee54d`](https://github.com/un-es/eslint-plugin-import-x/commit/46ee54d04d0eefa3ca0cb15325f547a047172daf) Thanks [@JounQin](https://github.com/JounQin)! - feat!: cleanup deps, remove unnecessary ponyfills
47+
- [#32](https://github.com/un-ts/eslint-plugin-import-x/pull/32) [`46ee54d`](https://github.com/un-ts/eslint-plugin-import-x/commit/46ee54d04d0eefa3ca0cb15325f547a047172daf) Thanks [@JounQin](https://github.com/JounQin)! - feat!: cleanup deps, remove unnecessary ponyfills

README.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# eslint-plugin-import-x
22

3-
[![GitHub Actions](https://github.com/un-es/eslint-plugin-import-x/workflows/CI/badge.svg)](https://github.com/un-es/eslint-plugin-import-x/actions/workflows/ci.yml)
4-
[![Codecov](https://img.shields.io/codecov/c/github/un-es/eslint-plugin-import-x.svg)](https://codecov.io/gh/un-es/eslint-plugin-import-x)
3+
[![GitHub Actions](https://github.com/un-ts/eslint-plugin-import-x/workflows/CI/badge.svg)](https://github.com/un-ts/eslint-plugin-import-x/actions/workflows/ci.yml)
4+
[![Codecov](https://img.shields.io/codecov/c/github/un-ts/eslint-plugin-import-x.svg)](https://codecov.io/gh/un-ts/eslint-plugin-import-x)
55
[![type-coverage](https://img.shields.io/badge/dynamic/json.svg?label=type-coverage&prefix=%E2%89%A5&suffix=%&query=$.typeCoverage.atLeast&uri=https%3A%2F%2Fraw.githubusercontent.com%2Fun-ts%2Fsynckit%2Fmain%2Fpackage.json)](https://github.com/plantain-00/type-coverage)
66
[![npm](https://img.shields.io/npm/v/eslint-plugin-import-x.svg)](https://www.npmjs.com/package/eslint-plugin-import-x)
7-
[![GitHub Release](https://img.shields.io/github/release/un-es/eslint-plugin-import-x)](https://github.com/un-es/eslint-plugin-import-x/releases)
7+
[![GitHub Release](https://img.shields.io/github/release/un-ts/eslint-plugin-import-x)](https://github.com/un-ts/eslint-plugin-import-x/releases)
88

99
[![Conventional Commits](https://img.shields.io/badge/conventional%20commits-1.0.0-yellow.svg)](https://conventionalcommits.org)
1010
[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)
@@ -74,26 +74,26 @@ This plugin intends to support linting of ES2015+ (ES6+) import/export syntax, a
7474

7575
### Style guide
7676

77-
| Name                            | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 ||
78-
| :------------------------------------------------------------------------------- | :------------------------------------------------------------------------- | :-- | :---- | :-- | :-- | :-- | :-- |
79-
| [consistent-type-specifier-style](docs/rules/consistent-type-specifier-style.md) | Enforce or ban the use of inline type-only markers for named imports. | | | | 🔧 | | |
80-
| [dynamic-import-chunkname](docs/rules/dynamic-import-chunkname.md) | Enforce a leading comment with the webpackChunkName for dynamic imports. | | | | | | |
81-
| [exports-last](docs/rules/exports-last.md) | Ensure all exports appear after other statements. | | | | | | |
82-
| [extensions](docs/rules/extensions.md) | Ensure consistent use of file extension within the import path. | | | | | | |
83-
| [first](docs/rules/first.md) | Ensure all imports appear before other statements. | | | | 🔧 | | |
84-
| [group-exports](docs/rules/group-exports.md) | Prefer named exports to be grouped together in a single export declaration | | | | | | |
85-
| [imports-first](docs/rules/imports-first.md) | Replaced by `import-x/first`. | | | | 🔧 | ||
86-
| [max-dependencies](docs/rules/max-dependencies.md) | Enforce the maximum number of dependencies a module can have. | | | | | | |
87-
| [newline-after-import](docs/rules/newline-after-import.md) | Enforce a newline after import statements. | | | | 🔧 | | |
88-
| [no-anonymous-default-export](docs/rules/no-anonymous-default-export.md) | Forbid anonymous values as default exports. | | | | | | |
89-
| [no-default-export](docs/rules/no-default-export.md) | Forbid default exports. | | | | | | |
90-
| [no-duplicates](docs/rules/no-duplicates.md) | Forbid repeated import of the same module in multiple places. | | ☑️ 🚸 | | 🔧 | | |
91-
| [no-named-default](docs/rules/no-named-default.md) | Forbid named default exports. | | | | | | |
92-
| [no-named-export](docs/rules/no-named-export.md) | Forbid named exports. | | | | | | |
93-
| [no-namespace](docs/rules/no-namespace.md) | Forbid namespace (a.k.a. "wildcard" `*`) imports. | | | | 🔧 | | |
94-
| [no-unassigned-import](docs/rules/no-unassigned-import.md) | Forbid unassigned imports | | | | | | |
95-
| [order](docs/rules/order.md) | Enforce a convention in module import order. | | | | 🔧 | | |
96-
| [prefer-default-export](docs/rules/prefer-default-export.md) | Prefer a default export if module exports a single name or multiple names. | | | | | | |
77+
| Name                            | Description | 💼 | ⚠️ | 🚫 | 🔧 | 💡 ||
78+
| :------------------------------------------------------------------------------- | :-------------------------------------------------------------------------- | :-- | :---- | :-- | :-- | :-- | :-- |
79+
| [consistent-type-specifier-style](docs/rules/consistent-type-specifier-style.md) | Enforce or ban the use of inline type-only markers for named imports. | | | | 🔧 | | |
80+
| [dynamic-import-chunkname](docs/rules/dynamic-import-chunkname.md) | Enforce a leading comment with the webpackChunkName for dynamic imports. | | | | | | |
81+
| [exports-last](docs/rules/exports-last.md) | Ensure all exports appear after other statements. | | | | | | |
82+
| [extensions](docs/rules/extensions.md) | Ensure consistent use of file extension within the import path. | | | | | | |
83+
| [first](docs/rules/first.md) | Ensure all imports appear before other statements. | | | | 🔧 | | |
84+
| [group-exports](docs/rules/group-exports.md) | Prefer named exports to be grouped together in a single export declaration. | | | | | | |
85+
| [imports-first](docs/rules/imports-first.md) | Replaced by `import-x/first`. | | | | 🔧 | ||
86+
| [max-dependencies](docs/rules/max-dependencies.md) | Enforce the maximum number of dependencies a module can have. | | | | | | |
87+
| [newline-after-import](docs/rules/newline-after-import.md) | Enforce a newline after import statements. | | | | 🔧 | | |
88+
| [no-anonymous-default-export](docs/rules/no-anonymous-default-export.md) | Forbid anonymous values as default exports. | | | | | | |
89+
| [no-default-export](docs/rules/no-default-export.md) | Forbid default exports. | | | | | | |
90+
| [no-duplicates](docs/rules/no-duplicates.md) | Forbid repeated import of the same module in multiple places. | | ☑️ 🚸 | | 🔧 | | |
91+
| [no-named-default](docs/rules/no-named-default.md) | Forbid named default exports. | | | | | | |
92+
| [no-named-export](docs/rules/no-named-export.md) | Forbid named exports. | | | | | | |
93+
| [no-namespace](docs/rules/no-namespace.md) | Forbid namespace (a.k.a. "wildcard" `*`) imports. | | | | 🔧 | | |
94+
| [no-unassigned-import](docs/rules/no-unassigned-import.md) | Forbid unassigned imports. | | | | | | |
95+
| [order](docs/rules/order.md) | Enforce a convention in module import order. | | | | 🔧 | | |
96+
| [prefer-default-export](docs/rules/prefer-default-export.md) | Prefer a default export if module exports a single name or multiple names. | | | | | | |
9797

9898
<!-- end auto-generated rules list -->
9999

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"name": "eslint-plugin-import-x",
33
"version": "0.3.1",
44
"description": "Import with sanity.",
5-
"repository": "git+https://github.com/un-es/eslint-plugin-import-x",
5+
"repository": "git+https://github.com/un-ts/eslint-plugin-import-x",
66
"author": "JounQin <[email protected]> (https://www.1stG.me)",
77
"license": "MIT",
88
"packageManager": "[email protected]",
99
"engines": {
10-
"node": ">=12"
10+
"node": ">=16"
1111
},
1212
"main": "lib/index.js",
1313
"exports": {
@@ -32,6 +32,7 @@
3232
"scripts": {
3333
"build": "tsc -p src",
3434
"clean": "rimraf lib",
35+
"codesandbox:install": "yarn --ignore-engines",
3536
"lint": "run-p lint:*",
3637
"lint:docs": "yarn update:eslint-docs --check",
3738
"lint:es": "eslint . --cache",
@@ -59,7 +60,7 @@
5960
"devDependencies": {
6061
"@1stg/prettier-config": "^4.0.1",
6162
"@1stg/tsconfig": "^2.3.3",
62-
"@angular-eslint/template-parser": "^17.2.1",
63+
"@angular-eslint/template-parser": "^17.3.0",
6364
"@babel/core": "^7.24.0",
6465
"@babel/eslint-parser": "^7.23.10",
6566
"@babel/plugin-proposal-decorators": "^7.24.0",
@@ -80,7 +81,7 @@
8081
"@types/is-glob": "^4.0.4",
8182
"@types/jest": "^29.5.12",
8283
"@types/json-schema": "^7.0.15",
83-
"@types/node": "^20.11.26",
84+
"@types/node": "^20.11.28",
8485
"@typescript-eslint/eslint-plugin": "^5.62.0",
8586
"@typescript-eslint/parser": "^5.62.0",
8687
"@typescript-eslint/typescript-estree": "^5.62.0",
@@ -94,11 +95,13 @@
9495
"eslint-import-resolver-typescript": "^3.6.1",
9596
"eslint-import-resolver-webpack": "^0.13.8",
9697
"eslint-import-test-order-redirect": "link:./test/fixtures/order-redirect",
97-
"eslint-plugin-eslint-plugin": "^2.3.0",
98+
"eslint-plugin-eslint-plugin": "^5.4.0",
9899
"eslint-plugin-import-x": "link:.",
99100
"eslint-plugin-jest": "^27.9.0",
100101
"eslint-plugin-json": "^3.1.0",
102+
"eslint-plugin-n": "^16.6.2",
101103
"eslint-plugin-prettier": "^5.1.3",
104+
"eslint-plugin-unicorn": "^51.0.1",
102105
"jest": "^29.7.0",
103106
"npm-run-all2": "^6.1.2",
104107
"prettier": "^3.2.5",

0 commit comments

Comments
 (0)