Skip to content

Commit

Permalink
feat!: update to eslint v9, flat config only (#8)
Browse files Browse the repository at this point in the history
* feat!: update to eslint v9, flat config only

BREAKING CHANGE: This package now only exports flat config. For more information see the [eslint migration guide](https://eslint.org/blog/2024/04/eslint-v9.0.0-released) and [flat config guide](https://eslint.org/blog/2022/08/new-config-system-part-2/). The README of this package has instructions for how to use this package with the new flat config system.

* refactor: write code in TS and compile with tsup

* fix: add an `index.ts` that re-exports other configs

* docs: update README

* fix: add the missing require export mapping

* chore: cleanup dev deps

* ci: add continuous integration workflow

* feat: update all configs to v9, with compat where needed

* chore: cleanup code for fix-tsup-type-files

* build: add script to generate src/index.ts

* build: disable tsup bundling

* style: formatting

* fix: properly enable import-x and re-enable promise/ and sonarjs/ rules

* fix: add `esbuild-plugin-file-path-extensions` to ensure proper CJS and MJS extensions

* fix: fix deprecated angular rules

* docs(readme): fixup angular usage

* docs(angular): use `lodash.merge`

* docs: formatting

* feat: add react-refresh

* fix: use eslint-plugin-prettier instead of eslint-config-prettier

* fix: disable `unicorn/consistent-function-scoping` for jsx/react
  • Loading branch information
favna authored Aug 21, 2024
1 parent 29b76b2 commit 740790d
Show file tree
Hide file tree
Showing 90 changed files with 3,531 additions and 2,626 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Continuous Integration
on:
pull_request:
push:
branches:
- main
jobs:
build-and-lint:
name: Build & Lint
runs-on: ubuntu-latest
if: github.repository_owner == 'icrawl'
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Dependencies
run: yarn --immutable

- name: Build & Lint
run: yarn lint

validate-generated-index:
name: Validate Generated Index
runs-on: ubuntu-latest
if: github.repository_owner == 'icrawl'
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Use Node.js v20
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Dependencies
run: yarn --immutable

- name: Generate new index
run: yarn gen-index

- name: Error if index is different
run: |
git status
if ! git diff-index --quiet HEAD --; then
echo "::error file=src/index.ts::File did not match generated file after script. Please review and adjust accordingly."
exit 1;
fi
Loading

0 comments on commit 740790d

Please sign in to comment.