Skip to content

Commit

Permalink
Fix prettier lint setup (#103)
Browse files Browse the repository at this point in the history
fix prettier lint setup
  • Loading branch information
keithamus authored Jan 26, 2025
1 parent dc293b2 commit 20e2587
Show file tree
Hide file tree
Showing 10 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bench/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const benches = []
const mapObjRefA = {}
const mapObjRefB = {}
function getArguments() {
return arguments
return arguments
}
class A {}
const fixtures = {
Expand Down
10 changes: 8 additions & 2 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
import eslintjs from '@eslint/js'
import prettier from 'eslint-plugin-prettier/recommended'

const { configs: eslintConfigs } = eslintjs

export default [
{
ignores: ['lib/', 'loupe.js'],
},
eslintConfigs['recommended'],
prettier,
{
languageOptions: {
globals: {
Expand All @@ -12,7 +17,8 @@ export default [
document: false,
window: false,
global: false,
}
HTMLElement: false,
},
},
rules: {
'no-unused-vars': [
Expand All @@ -35,7 +41,7 @@ export default [
describe: false,
beforeEach: false,
it: false,
}
},
},
},
]
14 changes: 14 additions & 0 deletions package-lock.json

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

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],
"scripts": {
"bench": "node bench",
"lint": "eslint --ignore-pattern .gitignore .",
"lint": "eslint .",
"semantic-release": "semantic-release pre && npm publish && semantic-release post",
"test": "npm run test:node && npm run test:browser",
"pretest:browser": "npx playwright install && npx playwright install-deps && npm run build",
Expand Down Expand Up @@ -59,6 +59,7 @@
"cross-env": "^7.0.3",
"esbuild": "^0.24.2",
"eslint": "^9.19.0",
"eslint-config-prettier": "^10.0.1",
"eslint-config-strict": "^14.0.1",
"eslint-plugin-filenames": "^1.3.2",
"eslint-plugin-prettier": "^5.2.3",
Expand Down
1 change: 0 additions & 1 deletion test/arguments.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import inspect from '../lib/index.js'
import { expect } from 'chai'
function args() {

return arguments
}
describe('arguments', () => {
Expand Down
1 change: 0 additions & 1 deletion test/buffers.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { expect } from 'chai'
describe('buffers', () => {
beforeEach(function () {
if (typeof Buffer !== 'function') {

this.skip()
}
})
Expand Down
1 change: 0 additions & 1 deletion test/functions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import inspect from '../lib/index.js'
import { expect } from 'chai'
describe('functions', () => {
Expand Down
2 changes: 1 addition & 1 deletion test/html.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import inspect from '../lib/index.js'
import { expect } from 'chai'

const h = (name, attributes, ...children) => {
const container = document.createElement(name)
for (const key in attributes) {
Expand Down
2 changes: 0 additions & 2 deletions test/promises.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ describe('promises', () => {
describe('default behaviour', () => {
beforeEach(function () {
if (isNode && canInspectPromises) {

this.skip()
}
})
Expand Down Expand Up @@ -40,7 +39,6 @@ describe('promises', () => {
describe('node <= 16', () => {
beforeEach(function () {
if (!isNode || !canInspectPromises) {

this.skip()
}
})
Expand Down
1 change: 0 additions & 1 deletion test/symbols.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import inspect from '../lib/index.js'
import { expect } from 'chai'
describe('symbols', () => {

it('returns Symbol() for empty Symbol', () => {
expect(inspect(Symbol())).to.equal('Symbol()')
})
Expand Down

0 comments on commit 20e2587

Please sign in to comment.