Skip to content
Merged
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
5 changes: 5 additions & 0 deletions .changeset/tough-plums-repeat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"prettier-eslint": patch
---

chore: take `.cjs`, `.cts`, `.mts` into account
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root=true

[*]
indent_style=space
indent_size=2
tab_width=2
end_of_line=lf
charset=utf-8
trim_trailing_whitespace=true
insert_final_newline=true
4 changes: 2 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const config = {
'plugin:node-dependencies/recommended'
],
parserOptions: {
ecmaVersion: 2021
ecmaVersion: 'latest'
},
rules: {
'valid-jsdoc': 'off',
Expand All @@ -20,7 +20,7 @@ const config = {
],
'import/no-import-module-exports': 'off',
'arrow-parens': ['error', 'as-needed'],
quotes: ['error', 'single', { avoidEscape: true }],
quotes: ['error', 'single', { avoidEscape: true }]
},
settings: {
'import/ignore': ['node_modules', 'src'] // Using CommonJS in src
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
* text=auto
*.js text eol=lf
yarn.lock -diff
8 changes: 1 addition & 7 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,12 @@ Yes || No

**Relevant code or config**

```javascript
```js

```

**What I did:**



**What happened:**

<!-- Please provide the full error message/screenshots/anything -->
Expand All @@ -44,8 +42,4 @@ minimal amount of code possible.

**Problem description:**



**Suggested solution:**


78 changes: 0 additions & 78 deletions .github/dependabot.yml

This file was deleted.

21 changes: 13 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
name: CI

on: [push, pull_request]
on:
- push
- pull_request

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
runs-on: ubuntu-latest

strategy:
matrix:
node-version:
- 10
- 12
- 14
node:
- 16
- 18
- 20
- 22
fail-fast: false

steps:
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

Expand All @@ -31,6 +36,6 @@ jobs:
run: npm start validate

- name: Check test coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
22 changes: 15 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ on:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write
id-token: write
pull-requests: write

jobs:
release:
name: Release
Expand All @@ -13,16 +22,15 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v4
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 16
uses: actions/setup-node@v3
- name: Setup Node.js LTS
uses: actions/setup-node@v4
with:
node-version: 16
node-version: lts/*

- name: Install Dependencies
run: npm install
run: npm i

- name: Build
run: npm start build
Expand All @@ -31,10 +39,10 @@ jobs:
id: changesets
uses: changesets/action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: npm start release
commit: 'chore: release prettier-eslint'
title: 'chore: release prettier-eslint'
publish: npm start release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
21 changes: 12 additions & 9 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,21 @@ name: Mark stale issues and pull requests

on:
schedule:
- cron: "0 0 * * *"
- cron: '0 0 * * *'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
stale:

runs-on: ubuntu-latest

steps:
- uses: actions/stale@v8
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue'
stale-pr-message: 'Stale pull request'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'Stale issue'
stale-pr-message: 'Stale pull request'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
4 changes: 0 additions & 4 deletions .husky/pre-commit

This file was deleted.

2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.20.2
v20.19.0
4 changes: 0 additions & 4 deletions .prettierrc.js

This file was deleted.

5 changes: 5 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"arrowParens": "avoid",
"singleQuote": true,
"plugins": ["prettier-plugin-pkg", "prettier-plugin-svelte"]
}
3 changes: 3 additions & 0 deletions .simple-git-hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"pre-commit": "npm start validate"
}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,15 @@ This allows you to use `eslint` to look for bugs and/or bad practices, and use
## Capturing ESLint messages

```javascript
const {analyze} = require("prettier-eslint");
const { analyze } = require('prettier-eslint');

const text = 'var x = 0;';
const result = await analyze({
text,
eslintConfig: {
rules: { 'no-var': 'error' }
}
})
});
console.log(result.messages);
```

Expand Down
2 changes: 1 addition & 1 deletion package-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module.exports = {
release: {
description:
'We automate releases with changesets. This should only be run on GitHub Actions',
script: 'changeset publish',
script: series('clean-pkg-json', 'changeset publish'),
},
validate: {
description:
Expand Down
Loading