Skip to content

Commit c396a0d

Browse files
committed
refactor: flex-development/esast migration
- https://github.com/flex-development/esast/tree/1.0.0-alpha.5 Signed-off-by: Lexus Drumgold <[email protected]>
1 parent 6829e60 commit c396a0d

39 files changed

+7081
-928
lines changed

Diff for: .codecov.yml

+2
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,11 @@ ignore:
8686
- '**/interfaces/'
8787
- '**/types/'
8888
- '**/index.ts'
89+
- '!src/index.ts'
8990

9091
profiling:
9192
critical_files_paths:
9293
- src/utils/compare.ts
94+
- src/utils/slice.ts
9395
- src/util.ts
9496
- src/visitor.ts

Diff for: .dictionary.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ cefc
44
codecov
55
commitlintrc
66
dedupe
7-
dedupe
87
deno
98
dessant
109
devlop
@@ -23,6 +22,7 @@ jchen
2322
kaisugi
2423
lcov
2524
lintstagedrc
25+
mdast
2626
mkbuild
2727
mlly
2828
nocheck

Diff for: .dprint.jsonc

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"binaryExpression.operatorPosition": "sameLine",
9393
"binaryExpression.spaceSurroundingBitwiseAndArithmeticOperator": true,
9494
"bracePosition": "sameLine",
95-
"commentLine.forceSpaceAfterSlashes": true,
95+
"commentLine.forceSpaceAfterSlashes": false,
9696
"constructSignature.spaceAfterNewKeyword": true,
9797
"constructor.spaceBeforeParentheses": false,
9898
"constructorType.spaceAfterNewKeyword": true,

Diff for: .eslintrc.base.cjs

+10-9
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ const config = {
3434
parser: '@typescript-eslint/parser',
3535
parserOptions: {
3636
extraFileExtensions: [],
37-
project: ['**/tsconfig.json'],
37+
project: ['**/tsconfig.json', '**/tsconfig.*.json'],
3838
tsconfigRootDir: process.cwd(),
3939
warnOnUnsupportedTypeScriptVersion: true
4040
},
@@ -495,9 +495,16 @@ const config = {
495495
checkConstructors: true,
496496
checkGetters: true,
497497
checkSetters: true,
498+
contexts: [
499+
'TSDeclareFunction:not(TSDeclareFunction + TSDeclareFunction)',
500+
'FunctionDeclaration:not(TSDeclareFunction + FunctionDeclaration)'
501+
],
498502
enableFixer: true,
499503
exemptEmptyConstructors: true,
500-
exemptEmptyFunctions: false
504+
exemptEmptyFunctions: false,
505+
require: {
506+
FunctionDeclaration: false
507+
}
501508
}
502509
],
503510
'jsdoc/require-param': [
@@ -619,13 +626,7 @@ const config = {
619626
'node/no-unpublished-require': 0,
620627
'node/no-unsupported-features/es-builtins': 2,
621628
'node/no-unsupported-features/es-syntax': 0,
622-
'node/no-unsupported-features/node-builtins': [
623-
2,
624-
{
625-
version: require('./package.json').engines?.node ??
626-
'>=' + fs.readFileSync('.nvmrc', 'utf8')
627-
}
628-
],
629+
'node/no-unsupported-features/node-builtins': 2,
629630
'node/prefer-global/buffer': 2,
630631
'node/prefer-global/console': 2,
631632
'node/prefer-global/process': 2,

Diff for: .github/infrastructure.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ branches:
4040
- context: test (19)
4141
- context: test (20)
4242
- context: typescript (5.3.3)
43+
- context: typescript (5.4.2)
4344
- context: typescript (latest)
4445
strict: true
4546
restrictions: null
@@ -166,7 +167,7 @@ repository:
166167
automated_security_fixes: true
167168
default_branch: main
168169
delete_branch_on_merge: true
169-
description: esast (and estree) utility to attach comments
170+
description: esast utility to attach comments
170171
has_issues: true
171172
has_projects: true
172173
has_wiki: false
@@ -181,14 +182,11 @@ repository:
181182
squash_merge_commit_message: BLANK
182183
squash_merge_commit_title: PR_TITLE
183184
topics:
184-
- acorn
185185
- ast
186186
- comment
187187
- ecmascript
188188
- esast
189189
- esast-util
190-
- estree
191-
- estree-util
192190
- javascript
193191
- js
194192
- unist

Diff for: .github/workflows/ci.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ permissions:
4040
packages: read
4141
env:
4242
CACHE_PATH: node_modules
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
GITHUB_TOKEN: ${{ secrets.GH_REGISTRY_TOKEN }}
4444
HUSKY: 0
4545
REF: ${{ github.head_ref || github.ref }}
4646
REF_NAME: ${{ github.head_ref || github.ref_name }}
@@ -245,6 +245,7 @@ jobs:
245245
matrix:
246246
typescript-version:
247247
- ${{ needs.preflight.outputs.version-typescript }}
248+
- 5.3.3
248249
- latest
249250
steps:
250251
- id: checkout

Diff for: .vscode/settings.json

-5
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,6 @@
267267
"resolutions"
268268
],
269269
"vsicons.associations.files": [
270-
{
271-
"extensions": [".commitlintrc.cts"],
272-
"format": "svg",
273-
"icon": "commitlint"
274-
},
275270
{
276271
"extensions": [".eslintrc.base.cjs"],
277272
"format": "svg",

Diff for: .yarn/releases/yarn-4.1.0.cjs renamed to .yarn/releases/yarn-4.1.1.cjs

+162-162
Large diffs are not rendered by default.

Diff for: .yarnrc.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ npmScopes:
3535

3636
patchFolder: ./patches
3737

38-
yarnPath: .yarn/releases/yarn-4.1.0.cjs
38+
yarnPath: .yarn/releases/yarn-4.1.1.cjs

Diff for: CONTRIBUTING.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ This means every commit must conform to the following format:
170170
│ │ │
171171
│ │ └─⫸ optional breaking change flag
172172
│ │
173-
│ └─⫸ see .commitlintrc.cts
173+
│ └─⫸ see .commitlintrc.ts
174174
175175
└─⫸ build|ci|chore|docs|feat|fix|perf|refactor|revert|style|test|wip
176176
@@ -201,7 +201,7 @@ e.g:
201201
- `build(deps-dev): bump cspell from 6.7.0 to 6.8.0`
202202
- `perf: lighten initial load`
203203
204-
See [`.commitlintrc.cts`](.commitlintrc.cts) to view all commit guidelines.
204+
See [`.commitlintrc.ts`](.commitlintrc.ts) to view all commit guidelines.
205205
206206
### Code Style
207207
@@ -333,7 +333,7 @@ When squashing, be sure to follow [commit message standards](#commit-messages):
333333
│ │ │
334334
│ │ └─⫸ optional breaking change flag
335335
│ │
336-
│ └─⫸ see .commitlintrc.cts
336+
│ └─⫸ see .commitlintrc.ts
337337
338338
└─⫸ build|ci|chore|docs|feat|fix|perf|refactor|release|revert|style|test
339339
```

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
[![vitest](https://img.shields.io/badge/-vitest-6e9f18?style=flat&logo=vitest&logoColor=ffffff)](https://vitest.dev/)
1111
[![yarn](https://img.shields.io/badge/-yarn-2c8ebb?style=flat&logo=yarn&logoColor=ffffff)](https://yarnpkg.com/)
1212

13-
[esast][esast] (and [estree][estree]) utility to attach comments
13+
[esast][esast] utility to attach comments
1414

1515
## Contents
1616

@@ -38,6 +38,7 @@ In Node.js (version 18+) with [yarn][yarn]:
3838

3939
```sh
4040
yarn add @flex-development/esast-util-attach-comments
41+
yarn add -D @flex-development/docast @flex-development/esast @types/mdast @types/unist
4142
```
4243

4344
<blockquote>
@@ -77,9 +78,8 @@ This package is fully typed with [TypeScript][typescript].
7778

7879
See [`CONTRIBUTING.md`](CONTRIBUTING.md).
7980

80-
[esast]: https://github.com/syntax-tree/esast
81+
[esast]: https://github.com/flex-development/esast
8182
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
8283
[esmsh]: https://esm.sh/
83-
[estree]: https://github.com/estree/estree
8484
[typescript]: https://www.typescriptlang.org
8585
[yarn]: https://yarnpkg.com

0 commit comments

Comments
 (0)