Skip to content

Commit 20e2587

Browse files
authored
Fix prettier lint setup (#103)
fix prettier lint setup
1 parent dc293b2 commit 20e2587

10 files changed

+26
-11
lines changed

bench/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const benches = []
55
const mapObjRefA = {}
66
const mapObjRefB = {}
77
function getArguments() {
8-
return arguments
8+
return arguments
99
}
1010
class A {}
1111
const fixtures = {

eslint.config.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import eslintjs from '@eslint/js'
2+
import prettier from 'eslint-plugin-prettier/recommended'
23

34
const { configs: eslintConfigs } = eslintjs
45

56
export default [
7+
{
8+
ignores: ['lib/', 'loupe.js'],
9+
},
610
eslintConfigs['recommended'],
11+
prettier,
712
{
813
languageOptions: {
914
globals: {
@@ -12,7 +17,8 @@ export default [
1217
document: false,
1318
window: false,
1419
global: false,
15-
}
20+
HTMLElement: false,
21+
},
1622
},
1723
rules: {
1824
'no-unused-vars': [
@@ -35,7 +41,7 @@ export default [
3541
describe: false,
3642
beforeEach: false,
3743
it: false,
38-
}
44+
},
3945
},
4046
},
4147
]

package-lock.json

+14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
],
2626
"scripts": {
2727
"bench": "node bench",
28-
"lint": "eslint --ignore-pattern .gitignore .",
28+
"lint": "eslint .",
2929
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
3030
"test": "npm run test:node && npm run test:browser",
3131
"pretest:browser": "npx playwright install && npx playwright install-deps && npm run build",
@@ -59,6 +59,7 @@
5959
"cross-env": "^7.0.3",
6060
"esbuild": "^0.24.2",
6161
"eslint": "^9.19.0",
62+
"eslint-config-prettier": "^10.0.1",
6263
"eslint-config-strict": "^14.0.1",
6364
"eslint-plugin-filenames": "^1.3.2",
6465
"eslint-plugin-prettier": "^5.2.3",

test/arguments.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import inspect from '../lib/index.js'
22
import { expect } from 'chai'
33
function args() {
4-
54
return arguments
65
}
76
describe('arguments', () => {

test/buffers.js

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { expect } from 'chai'
33
describe('buffers', () => {
44
beforeEach(function () {
55
if (typeof Buffer !== 'function') {
6-
76
this.skip()
87
}
98
})

test/functions.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
import inspect from '../lib/index.js'
32
import { expect } from 'chai'
43
describe('functions', () => {

test/html.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import inspect from '../lib/index.js'
22
import { expect } from 'chai'
3-
3+
44
const h = (name, attributes, ...children) => {
55
const container = document.createElement(name)
66
for (const key in attributes) {

test/promises.js

-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ describe('promises', () => {
66
describe('default behaviour', () => {
77
beforeEach(function () {
88
if (isNode && canInspectPromises) {
9-
109
this.skip()
1110
}
1211
})
@@ -40,7 +39,6 @@ describe('promises', () => {
4039
describe('node <= 16', () => {
4140
beforeEach(function () {
4241
if (!isNode || !canInspectPromises) {
43-
4442
this.skip()
4543
}
4644
})

test/symbols.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import inspect from '../lib/index.js'
22
import { expect } from 'chai'
33
describe('symbols', () => {
4-
54
it('returns Symbol() for empty Symbol', () => {
65
expect(inspect(Symbol())).to.equal('Symbol()')
76
})

0 commit comments

Comments
 (0)