Skip to content

Commit

Permalink
refactor: flex-development/esast migration
Browse files Browse the repository at this point in the history
  • Loading branch information
unicornware committed Mar 21, 2024
1 parent 6829e60 commit c396a0d
Show file tree
Hide file tree
Showing 39 changed files with 7,081 additions and 928 deletions.
2 changes: 2 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ ignore:
- '**/interfaces/'
- '**/types/'
- '**/index.ts'
- '!src/index.ts'

profiling:
critical_files_paths:
- src/utils/compare.ts
- src/utils/slice.ts
- src/util.ts
- src/visitor.ts
2 changes: 1 addition & 1 deletion .dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ cefc
codecov
commitlintrc
dedupe
dedupe
deno
dessant
devlop
Expand All @@ -23,6 +22,7 @@ jchen
kaisugi
lcov
lintstagedrc
mdast
mkbuild
mlly
nocheck
Expand Down
2 changes: 1 addition & 1 deletion .dprint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"binaryExpression.operatorPosition": "sameLine",
"binaryExpression.spaceSurroundingBitwiseAndArithmeticOperator": true,
"bracePosition": "sameLine",
"commentLine.forceSpaceAfterSlashes": true,
"commentLine.forceSpaceAfterSlashes": false,
"constructSignature.spaceAfterNewKeyword": true,
"constructor.spaceBeforeParentheses": false,
"constructorType.spaceAfterNewKeyword": true,
Expand Down
19 changes: 10 additions & 9 deletions .eslintrc.base.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const config = {
parser: '@typescript-eslint/parser',
parserOptions: {
extraFileExtensions: [],
project: ['**/tsconfig.json'],
project: ['**/tsconfig.json', '**/tsconfig.*.json'],
tsconfigRootDir: process.cwd(),
warnOnUnsupportedTypeScriptVersion: true
},
Expand Down Expand Up @@ -495,9 +495,16 @@ const config = {
checkConstructors: true,
checkGetters: true,
checkSetters: true,
contexts: [
'TSDeclareFunction:not(TSDeclareFunction + TSDeclareFunction)',
'FunctionDeclaration:not(TSDeclareFunction + FunctionDeclaration)'
],
enableFixer: true,
exemptEmptyConstructors: true,
exemptEmptyFunctions: false
exemptEmptyFunctions: false,
require: {
FunctionDeclaration: false
}
}
],
'jsdoc/require-param': [
Expand Down Expand Up @@ -619,13 +626,7 @@ const config = {
'node/no-unpublished-require': 0,
'node/no-unsupported-features/es-builtins': 2,
'node/no-unsupported-features/es-syntax': 0,
'node/no-unsupported-features/node-builtins': [
2,
{
version: require('./package.json').engines?.node ??
'>=' + fs.readFileSync('.nvmrc', 'utf8')
}
],
'node/no-unsupported-features/node-builtins': 2,
'node/prefer-global/buffer': 2,
'node/prefer-global/console': 2,
'node/prefer-global/process': 2,
Expand Down
6 changes: 2 additions & 4 deletions .github/infrastructure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ branches:
- context: test (19)
- context: test (20)
- context: typescript (5.3.3)
- context: typescript (5.4.2)
- context: typescript (latest)
strict: true
restrictions: null
Expand Down Expand Up @@ -166,7 +167,7 @@ repository:
automated_security_fixes: true
default_branch: main
delete_branch_on_merge: true
description: esast (and estree) utility to attach comments
description: esast utility to attach comments
has_issues: true
has_projects: true
has_wiki: false
Expand All @@ -181,14 +182,11 @@ repository:
squash_merge_commit_message: BLANK
squash_merge_commit_title: PR_TITLE
topics:
- acorn
- ast
- comment
- ecmascript
- esast
- esast-util
- estree
- estree-util
- javascript
- js
- unist
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ permissions:
packages: read
env:
CACHE_PATH: node_modules
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_REGISTRY_TOKEN }}
HUSKY: 0
REF: ${{ github.head_ref || github.ref }}
REF_NAME: ${{ github.head_ref || github.ref_name }}
Expand Down Expand Up @@ -245,6 +245,7 @@ jobs:
matrix:
typescript-version:
- ${{ needs.preflight.outputs.version-typescript }}
- 5.3.3
- latest
steps:
- id: checkout
Expand Down
5 changes: 0 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@
"resolutions"
],
"vsicons.associations.files": [
{
"extensions": [".commitlintrc.cts"],
"format": "svg",
"icon": "commitlint"
},
{
"extensions": [".eslintrc.base.cjs"],
"format": "svg",
Expand Down
324 changes: 162 additions & 162 deletions .yarn/releases/yarn-4.1.0.cjs → .yarn/releases/yarn-4.1.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ npmScopes:

patchFolder: ./patches

yarnPath: .yarn/releases/yarn-4.1.0.cjs
yarnPath: .yarn/releases/yarn-4.1.1.cjs
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ This means every commit must conform to the following format:
│ │ │
│ │ └─⫸ optional breaking change flag
│ │
│ └─⫸ see .commitlintrc.cts
│ └─⫸ see .commitlintrc.ts
└─⫸ build|ci|chore|docs|feat|fix|perf|refactor|revert|style|test|wip
Expand Down Expand Up @@ -201,7 +201,7 @@ e.g:
- `build(deps-dev): bump cspell from 6.7.0 to 6.8.0`
- `perf: lighten initial load`
See [`.commitlintrc.cts`](.commitlintrc.cts) to view all commit guidelines.
See [`.commitlintrc.ts`](.commitlintrc.ts) to view all commit guidelines.
### Code Style
Expand Down Expand Up @@ -333,7 +333,7 @@ When squashing, be sure to follow [commit message standards](#commit-messages):
│ │ │
│ │ └─⫸ optional breaking change flag
│ │
│ └─⫸ see .commitlintrc.cts
│ └─⫸ see .commitlintrc.ts
└─⫸ build|ci|chore|docs|feat|fix|perf|refactor|release|revert|style|test
```
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[![vitest](https://img.shields.io/badge/-vitest-6e9f18?style=flat&logo=vitest&logoColor=ffffff)](https://vitest.dev/)
[![yarn](https://img.shields.io/badge/-yarn-2c8ebb?style=flat&logo=yarn&logoColor=ffffff)](https://yarnpkg.com/)

[esast][esast] (and [estree][estree]) utility to attach comments
[esast][esast] utility to attach comments

## Contents

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

```sh
yarn add @flex-development/esast-util-attach-comments
yarn add -D @flex-development/docast @flex-development/esast @types/mdast @types/unist
```

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

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

[esast]: https://github.com/syntax-tree/esast
[esast]: https://github.com/flex-development/esast
[esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c
[esmsh]: https://esm.sh/
[estree]: https://github.com/estree/estree
[typescript]: https://www.typescriptlang.org
[yarn]: https://yarnpkg.com
Loading

0 comments on commit c396a0d

Please sign in to comment.