diff --git a/.github/workflows/format-files.yml b/.github/workflows/format-files.yml new file mode 100644 index 00000000000..a41dc81a2b5 --- /dev/null +++ b/.github/workflows/format-files.yml @@ -0,0 +1,28 @@ +name: 'Maintenance: Format w/ Prettier' + +on: + pull_request: + branches: ['master'] + +jobs: + prettier: + runs-on: 'ubuntu-latest' + + steps: + - uses: 'actions/checkout@v4' + with: + # Make sure the actual branch is checked out when running on pull requests + ref: '${{ github.head_ref }}' + # This is important to fetch the changes to the previous commit + fetch-depth: 0 + - uses: 'actions/setup-node@v4' + with: + node-version: '18' + cache: 'npm' + cache-dependency-path: './package-lock.json' + - run: 'npm clean-install' + - uses: 'creyD/prettier_action@v4.3' + with: + # This part is also where you can pass other options, for example: + prettier_options: '--write' + only_changed: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 22548979a94..00000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: 'Maintenance: Lint' - -on: [push, pull_request] - -jobs: - lint-editorconfig: - runs-on: ubuntu-latest - name: Lint for editorconfig violations - steps: - - name: Checkout the repository - uses: actions/checkout@v4 - - # Enablement of https://pre-commit.ci is desirable as it also - # enable auto-fixes for formatting violations. Still we still want to run - # our own GitHub action, just in case the external service becomes - # unavailable. - - uses: actions/setup-python@v5 - with: - python-version: '3.11' - - name: Install pre-commit - run: | - python3 -m pip install --upgrade pip - python3 -m pip install --upgrade pre-commit - - name: Run pre-commit - run: | - pre-commit run --all-files diff --git a/.github/workflows/nodejs.yml b/.github/workflows/validate-schemas.yml similarity index 100% rename from .github/workflows/nodejs.yml rename to .github/workflows/validate-schemas.yml diff --git a/eslint.config.js b/eslint.config.js index e7f1c8e7dfb..324e356db40 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -13,6 +13,10 @@ export default [ node.configs['flat/recommended-script'], prettier, { + + + + languageOptions: { globals: { ...globals.es2021,