Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESLint v9 and flat config #774

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "extends": ["@commitlint/config-conventional"] }
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true


[*.yml]
indent_style = space
indent_size = 2
16 changes: 11 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
name: CI
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
- push
- pull_request

jobs:
test:
name: Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 20
- 18
- 22
- 23
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install --force
- run: npm install
- run: npm test
# - uses: codecov/codecov-action@v1
# if: matrix.node-version == 14
Expand Down
23 changes: 13 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
.DS_Store
.idea
Thumbs.db
tmp/
temp/
node_modules
yarn.lock
!test/fixtures/project/node_modules
test/fixtures/project/node_modules/.cache
!test/fixtures/typescript/extends-module/node_modules
test/fixtures/typescript/extends-module/node_modules/.cache
!test/fixtures/typescript/extends-tsconfig-bases/node_modules
test/fixtures/typescript/extends-tsconfig-bases/node_modules/.cache
!test/fixtures/typescript/extends-array/node_modules
test/fixtures/typescript/extends-array/node_modules/.cache
.nyc_output
!test/fixtures/node_modules
coverage
*.lcov
.nyc_output
*.log
.env
dist
.tsimp
*.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx commitlint --edit $1
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx lint-staged
5 changes: 5 additions & 0 deletions .lintstagedrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
'*.md,!test/**/*.md': 'prettier --check',
'./package.json': ['npmPkgJsonLint ./package.json', 'prettier --check --plugin=prettier-plugin-packagejson ./package.json'],
'*.{js,ts}': 'node . --fix',
};
1 change: 1 addition & 0 deletions .npmpackagejsonlintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "extends": "npm-package-json-lint-config-default" }
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
./*.ts
./*.js
!./prettier-test.ts
224 changes: 0 additions & 224 deletions cli.js

This file was deleted.

5 changes: 0 additions & 5 deletions config/overrides.cjs

This file was deleted.

Loading
Loading