Skip to content

Commit

Permalink
add prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
mansona committed Sep 30, 2024
1 parent 3530a00 commit 930eef8
Show file tree
Hide file tree
Showing 9 changed files with 131 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"env": {
"node": true
},
"extends": "airbnb-base",
"extends": ["airbnb-base", "plugin:prettier/recommended"],

"overrides": [
{
Expand Down
5 changes: 5 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'use strict';

module.exports = {
singleQuote: true,
};
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
const { readFileSync, writeFileSync, lstatSync } = require('fs');
const { join } = require('path');
const importCwd = require('import-cwd');
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,18 @@
"chai": "^4.3.4",
"eslint": "^7.32.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.25.2",
"eslint-plugin-prettier": "^5.2.1",
"execa": "^6.0.0",
"find-up": "^6.3.0",
"fixturify": "^2.1.1",
"import-meta-resolve": "^2.1.0",
"lint-to-the-future": "^2.1.0",
"lint-to-the-future-eslint": "file:.",
"mocha": "^9.1.3",
"pkg-up": "^4.0.0",
"prettier": "^3.3.3",
"release-it": "^14.11.6",
"temp": "^0.9.4"
},
Expand Down
114 changes: 113 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 2 additions & 4 deletions test/fixtures/list/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/* eslint-disable no-unused-vars, prefer-const, quotes, semi */
let unused = "face";
let unused = 'face';

let b = () => {

}
let b = () => {};
6 changes: 2 additions & 4 deletions test/fixtures/list/next-line-ignore.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
/* eslint-disable no-unused-vars, quotes, semi */
const unused = "face";
const unused = 'face';

// eslint-disable-next-line prefer-const
let b = () => {

}
let b = () => {};
1 change: 1 addition & 0 deletions test/ignore.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
import { expect } from 'chai';
import temp from 'temp';
import fixturify from 'fixturify';
Expand Down
1 change: 1 addition & 0 deletions test/list.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable prettier/prettier */
import { expect } from 'chai';

// eslint-disable-next-line import/extensions
Expand Down

0 comments on commit 930eef8

Please sign in to comment.