Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: prettier/prettier-eslint-cli
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.7.1
Choose a base ref
...
head repository: prettier/prettier-eslint-cli
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 1,023 additions and 655 deletions.
  1. +88 −1 .all-contributorsrc
  2. +0 −23 .babelrc
  3. +8 −0 .changeset/README.md
  4. +16 −0 .changeset/config.json
  5. +4 −0 .codesandbox/ci.json
  6. +1 −1 .eslintignore
  7. +0 −15 .eslintrc
  8. +24 −0 .eslintrc.js
  9. +15 −0 .github/FUNDING.yml
  10. +0 −4 .github/ISSUE_TEMPLATE.md
  11. +3 −1 .github/PULL_REQUEST_TEMPLATE.md
  12. +35 −0 .github/workflows/ci.yml
  13. +41 −0 .github/workflows/release.yml
  14. +1 −0 .gitignore
  15. +2 −2 .npmrc
  16. +1 −0 .nvmrc
  17. +1 −1 .prettierignore
  18. +5 −0 .renovaterc
  19. +0 −17 .travis.yml
  20. +23 −2 CHANGELOG.md
  21. +13 −13 CONTRIBUTING.md
  22. +59 −18 README.md
  23. +6 −6 __mocks__/fs.js
  24. +1 −1 __mocks__/get-stdin.js
  25. +87 −66 __mocks__/glob.js
  26. +8 −8 __mocks__/prettier-eslint.js
  27. +16 −0 babel.config.js
  28. +0 −6 cli-test/jest.config.json
  29. +0 −22 cli-test/tests/__snapshots__/index.js.snap
  30. +8 −3 jest.config.js
  31. +10 −10 other/CODE_OF_CONDUCT.md
  32. +22 −21 package-scripts.js
  33. +69 −46 package.json
  34. +2 −2 src/__snapshots__/uncaught-exception-handler.test.js.snap
  35. +2 −2 src/add-exception-handler.js
  36. +1 −1 src/argv.js
  37. +149 −122 src/format-files.js
  38. +79 −90 src/format-files.test.js
  39. +7 −7 src/index.js
  40. +13 −13 src/message.test.js
  41. +5 −5 src/messages.js
  42. +71 −65 src/parser.js
  43. +17 −0 src/prettier-eslint.js
  44. +5 −5 src/uncaught-exception-handler.js
  45. +12 −12 src/uncaught-exception-handler.test.js
  46. 0 {cli-test → test}/fixtures/stdout1.js
  47. 0 {cli-test → test}/fixtures/stdout2.js
  48. +5 −0 test/override-config.js
  49. +22 −0 test/tests/__snapshots__/cli.spec.js.snap
  50. +66 −44 cli-test/tests/index.js → test/tests/cli.spec.js
89 changes: 88 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -203,6 +203,93 @@
"doc",
"test"
]
},
{
"login": "bj00rn",
"name": "Björn Dalfors",
"avatar_url": "https://avatars0.githubusercontent.com/u/10961167?v=4",
"profile": "https://github.com/bj00rn",
"contributions": [
"infra"
]
},
{
"login": "sscaff1",
"name": "Steven Scaffidi",
"avatar_url": "https://avatars1.githubusercontent.com/u/1554424?v=4",
"profile": "https://github.com/sscaff1",
"contributions": [
"doc"
]
},
{
"login": "dpwilhelmsen",
"name": "Daniel Wilhelmsen",
"avatar_url": "https://avatars3.githubusercontent.com/u/1758049?v=4",
"profile": "http://danielwilhelmsen.com",
"contributions": [
"code",
"maintenance"
]
},
{
"login": "gwhitney",
"name": "Glen Whitney",
"avatar_url": "https://avatars.githubusercontent.com/u/3825429?v=4",
"profile": "https://github.com/gwhitney",
"contributions": [
"maintenance"
]
},
{
"login": "idahogurl",
"name": "Rebecca Vest",
"avatar_url": "https://avatars.githubusercontent.com/u/10620169?v=4",
"profile": "https://campcode.dev/",
"contributions": [
"code"
]
},
{
"login": "JounQin",
"name": "JounQin",
"avatar_url": "https://avatars.githubusercontent.com/u/8336744?v=4",
"profile": "https://www.1stg.me/",
"contributions": [
"question",
"code",
"design",
"doc",
"ideas",
"infra",
"maintenance",
"plugin",
"projectManagement",
"review",
"test",
"tool"
]
},
{
"login": "dorser",
"name": "dorser",
"avatar_url": "https://avatars2.githubusercontent.com/u/20969462?v=4",
"profile": "https://github.com/dorser",
"contributions": [
"code",
"maintenance"
]
},
{
"login": "u3u",
"name": "さくら",
"avatar_url": "https://avatars2.githubusercontent.com/u/20062482?v=4",
"profile": "https://qwq.cat",
"contributions": [
"code"
]
}
]
],
"repoType": "github",
"commitConvention": "none"
}
23 changes: 0 additions & 23 deletions .babelrc

This file was deleted.

8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
16 changes: 16 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"$schema": "https://unpkg.com/@changesets/config/schema.json",
"changelog": [
"@changesets/changelog-github",
{
"repo": "prettier/prettier-eslint-cli"
}
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
4 changes: 4 additions & 0 deletions .codesandbox/ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"node": "16",
"sandboxes": []
}
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@ node_modules
.nyc_output
coverage
dist
cli-test/fixtures
test/fixtures
15 changes: 0 additions & 15 deletions .eslintrc

This file was deleted.

24 changes: 24 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
const config = {
extends: [
'kentcdodds',
'kentcdodds/jest',
'plugin:node-dependencies/recommended'
],
rules: {
quotes: ['error', 'single', { avoidEscape: true }],
'arrow-parens': ['error', 'as-needed'],
'import/max-dependencies': 'off',
'jest/prefer-snapshot-hint': 'off',
'max-len': 'off',
'space-before-function-paren': [
'error',
{
anonymous: 'never',
named: 'never',
asyncArrow: 'always'
}
]
}
};

module.exports = config;
15 changes: 15 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
github:
- prettier-eslint
- JounQin
- 1stG
- rx-ts
- un-ts
patreon: PrettierESLint
open_collective: prettier-eslint-cli
custom:
- https://opencollective.com/prettier-eslint
- https://opencollective.com/1stG
- https://opencollective.com/rxts
- https://opencollective.com/unts
- https://patreon.com/1stG
- https://afdian.net/@JounQin
4 changes: 0 additions & 4 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -23,8 +23,6 @@ Relevant code/config.

What you did:



What happened:

<!-- Please provide the full error message/screenshots/anything -->
@@ -41,6 +39,4 @@ with as minimal amount of code possible. Then paste a link below:

Problem description:



Suggested solution:
4 changes: 3 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -15,13 +15,15 @@ merge of your pull request!
-->

<!-- What changes are being made? (What feature/bug is being fixed here?) -->

**What**:

<!-- Why are these changes necessary? -->

**Why**:

<!-- How were these changes implemented? -->
**How**:

**How**:

<!-- feel free to add additional comments -->
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

on:
- push
- pull_request

jobs:
ci:
runs-on: ubuntu-latest

strategy:
matrix:
node-version:
- 12
- 14
- 16
- 18
- 20

steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
run: npm i

- name: Lint, test, and build
run: npm start validate

- name: Check test coverage
uses: codecov/codecov-action@v3
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
push:
branches:
- master

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- 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 LTS
uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Install Dependencies
run: npm i

- name: Build
run: npm run build

- name: Create Release Pull Request or Publish to npm
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 run release
# this expects you to have a npm script called version that runs some logic and then calls `changeset version`.
version: npm run version
commit: 'chore: release prettier-eslint-cli'
title: 'chore: release prettier-eslint-cli'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ dist
.opt-out
.DS_Store
.eslintcache
*.log

# these cause more harm than good
# when working with contributors
4 changes: 2 additions & 2 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
registry=http://registry.npmjs.org/
save-exact=true
registry=https://registry.npmjs.org/
package-lock=false
legacy-peer-deps=true
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.20.2
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -2,4 +2,4 @@ node_modules
.nyc_output
coverage
dist
cli-test/fixtures
test/fixtures
5 changes: 5 additions & 0 deletions .renovaterc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"extends": [
"github>1stG/configs"
]
}
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
# CHANGELOG

The changelog is automatically updated using [semantic-release](https://github.com/semantic-release/semantic-release).
You can see it on the [releases page](https://github.com/prettier/prettier-eslint-cli/releases).
## 8.0.1

### Patch Changes

- [#451](https://github.com/prettier/prettier-eslint-cli/pull/451) [`df191a1`](https://github.com/prettier/prettier-eslint-cli/commit/df191a1415ecb2529849d99eff66b2f5616b410b) Thanks [@JounQin](https://github.com/JounQin)! - chore: update node version align with prettier-eslint

## 8.0.0

### Major Changes

- [#449](https://github.com/prettier/prettier-eslint-cli/pull/449) [`5fd8eea`](https://github.com/prettier/prettier-eslint-cli/commit/5fd8eea1eb9f17fe0fab931aa8e59c8a2fc87529) Thanks [@JounQin](https://github.com/JounQin)! - feat!: bump all (dev)Dependencies, drop node < 16

## 7.1.0

### Minor Changes

- [#132](https://github.com/prettier/prettier-eslint-cli/pull/132) [`4561a79`](https://github.com/prettier/prettier-eslint-cli/commit/4561a799b90f0c0c2861a81426ced852b4468377) Thanks [@u3u](https://github.com/u3u)! - feat: support matching dot files

## 7.0.2

### Patch Changes

- [#288](https://github.com/prettier/prettier-eslint-cli/pull/288) [`4093cb7`](https://github.com/prettier/prettier-eslint-cli/commit/4093cb7830d49fd8cda23fe33008694dc61074a6) Thanks [@dorser](https://github.com/dorser)! - fix(list-different): removed the message at the end of execution
Loading