Skip to content

Commit

Permalink
feat: upgrade prettier to v2 (mysticatea#21)
Browse files Browse the repository at this point in the history
* feat: upgrade `prettier` to v2

BREAKING CHANGE: `es5`, `es2015`, `es2016`, `es2017`, `es2018`, `es2019`, `es2020`, `es2021` & `es2022` configs will now report for their changed default values. For more info check their [release notes](https://prettier.io/blog/2020/03/21/2.0.0.html#breaking-changes)

* chore: fix ESLint errors

* chore: run Prettier on codebase
  • Loading branch information
MichaelDeBoey authored Oct 17, 2022
1 parent aeff618 commit 668d46e
Show file tree
Hide file tree
Showing 35 changed files with 428 additions and 445 deletions.
4 changes: 2 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
root: true
extends:
- plugin:@eslint-community/mysticatea/es2015
- plugin:@eslint-community/mysticatea/+eslint-plugin
- plugin:@eslint-community/mysticatea/es2015
- plugin:@eslint-community/mysticatea/+eslint-plugin
16 changes: 8 additions & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily

- package-ecosystem: npm
directory: /
schedule:
interval: daily
- package-ecosystem: npm
directory: /
schedule:
interval: daily
235 changes: 117 additions & 118 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,122 +1,121 @@
name: CI
on:
push:
branches:
# default semantic-release branches
- +([0-9])?(.{+([0-9]),x}).x
- main
- next
- next-major
- beta
- alpha
pull_request:
schedule:
- cron: 0 0 * * 0
push:
branches:
# default semantic-release branches
- +([0-9])?(.{+([0-9]),x}).x
- main
- next
- next-major
- beta
- alpha
pull_request:
schedule:
- cron: 0 0 * * 0

jobs:
lint:
name: ⬣ Lint
runs-on: ubuntu-latest
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: βŽ” Setup Node
uses: actions/setup-node@v3
with:
node-version: 18

- name: πŸ“₯ Install dependencies
run: npm install

- name: ▢️ Run lint script
run: npm run lint

test:
name:
πŸ§ͺ Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{
matrix.os }})
strategy:
matrix:
eslint: [6]
node: [12.22.0, 12, 14.17.0, 14, 16, 18]
os: [ubuntu-latest]
include:
# On other platforms
- os: windows-latest
eslint: 6
node: 18
- os: macos-latest
eslint: 6
node: 18
# On the minimum supported ESLint/Node.js version
- eslint: 6.6.0
node: 12.22.0
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: βŽ” Setup Node v${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: πŸ“₯ Install dependencies
run: npm install

# - name: πŸ“₯ Install ESLint v${{ matrix.eslint }}
# run: npm install --save-dev eslint@${{ matrix.eslint }}

- name: ▢️ Run test script
run: npm run test

- name: ⬆️ Upload coverage report
uses: codecov/codecov-action@v3

release:
name: πŸš€ Release
needs: [lint, test]
runs-on: ubuntu-latest
if:
github.repository == 'eslint-community/eslint-plugin-mysticatea' &&
contains('refs/heads/main,refs/heads/next,refs/heads/beta,refs/heads/alpha',
github.ref) && github.event_name == 'push'
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: βŽ” Setup node
uses: actions/setup-node@v3
with:
node-version: 18

- name: πŸ“₯ Install dependencies
run: npm install

- name: πŸš€ Release
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 19
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'main',
'next',
'next-major',
{name: 'beta', prerelease: true},
{name: 'alpha', prerelease: true}
]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
lint:
name: ⬣ Lint
runs-on: ubuntu-latest
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: βŽ” Setup Node
uses: actions/setup-node@v3
with:
node-version: 18

- name: πŸ“₯ Install dependencies
run: npm install

- name: ▢️ Run lint script
run: npm run lint

test:
name:
πŸ§ͺ Test (Node@${{ matrix.node }} - ESLint@${{ matrix.eslint }} - ${{
matrix.os }})
strategy:
matrix:
eslint: [6]
node: [12.22.0, 12, 14.17.0, 14, 16, 18]
os: [ubuntu-latest]
include:
# On other platforms
- os: windows-latest
eslint: 6
node: 18
- os: macos-latest
eslint: 6
node: 18
# On the minimum supported ESLint/Node.js version
- eslint: 6.6.0
node: 12.22.0
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: βŽ” Setup Node v${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}

- name: πŸ“₯ Install dependencies
run: npm install

# - name: πŸ“₯ Install ESLint v${{ matrix.eslint }}
# run: npm install --save-dev eslint@${{ matrix.eslint }}

- name: ▢️ Run test script
run: npm run test

- name: ⬆️ Upload coverage report
uses: codecov/codecov-action@v3

release:
name: πŸš€ Release
needs: [lint, test]
runs-on: ubuntu-latest
if: github.repository == 'eslint-community/eslint-plugin-mysticatea' &&
contains('refs/heads/main,refs/heads/next,refs/heads/beta,refs/heads/alpha',
github.ref) && github.event_name == 'push'
steps:
- name: πŸ›‘ Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: βŽ” Setup node
uses: actions/setup-node@v3
with:
node-version: 18

- name: πŸ“₯ Install dependencies
run: npm install

- name: πŸš€ Release
uses: cycjimmy/semantic-release-action@v3
with:
semantic_version: 19
branches: |
[
'+([0-9])?(.{+([0-9]),x}).x',
'main',
'next',
'next-major',
{name: 'beta', prerelease: true},
{name: 'alpha', prerelease: true}
]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
44 changes: 22 additions & 22 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,29 @@
name: πŸ₯Ί No Response

on:
schedule:
# Schedule for five minutes after the hour, every hour
- cron: "5 * * * *"
schedule:
# Schedule for five minutes after the hour, every hour
- cron: "5 * * * *"

permissions:
issues: write
pull-requests: write
issues: write
pull-requests: write

jobs:
stale:
if: github.repository == 'eslint-community/eslint-plugin-mysticatea'
runs-on: ubuntu-latest
steps:
- name: πŸ₯Ί Handle Ghosting
uses: actions/stale@v6
with:
close-issue-message: >
This issue has been automatically closed because we haven't received a
response from the original author πŸ™ˆ. This automation helps keep the issue
tracker clean from issues that aren't actionable. Please reach out if you
have more information for us! πŸ™‚
close-pr-message: >
This PR has been automatically closed because we haven't received a
response from the original author πŸ™ˆ. This automation helps keep the issue
tracker clean from PRs that aren't actionable. Please reach out if you
have more information for us! πŸ™‚
stale:
if: github.repository == 'eslint-community/eslint-plugin-mysticatea'
runs-on: ubuntu-latest
steps:
- name: πŸ₯Ί Handle Ghosting
uses: actions/stale@v6
with:
close-issue-message: >
This issue has been automatically closed because we haven't received a
response from the original author πŸ™ˆ. This automation helps keep the issue
tracker clean from issues that aren't actionable. Please reach out if you
have more information for us! πŸ™‚
close-pr-message: >
This PR has been automatically closed because we haven't received a
response from the original author πŸ™ˆ. This automation helps keep the issue
tracker clean from PRs that aren't actionable. Please reach out if you
have more information for us! πŸ™‚
8 changes: 4 additions & 4 deletions .nycrc.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include:
- lib
- lib
exclude:
- lib/processors/vue.js
- lib/processors/vue.js
reporter:
- text-summary
- lcov
- text-summary
- lcov
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
tabWidth: 4,
semi: false,
trailingComma: "es5",
}
Loading

0 comments on commit 668d46e

Please sign in to comment.