Skip to content

Commit

Permalink
eslint by update lavy
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinBirkhoff committed Jun 22, 2023
1 parent 92c82ed commit e054d48
Show file tree
Hide file tree
Showing 7 changed files with 102 additions and 99 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ build
dist
lib
esm
es
node_modules
8 changes: 4 additions & 4 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ const babel = require('gulp-babel')
const ts = require('gulp-typescript')
const del = require('del')

gulp.task('clean', async function () {
gulp.task('clean', async () => {
await del('lib/**')
await del('es/**')
await del('dist/**')
})

gulp.task('es', function () {
gulp.task('es', () => {
const tsProject = ts.createProject('tsconfig.json', {
module: 'ESNext'
})
return tsProject.src().pipe(tsProject()).pipe(babel()).pipe(gulp.dest('es/'))
})

gulp.task('cjs', function () {
gulp.task('cjs', () => {
return gulp
.src(['./es/**/*.js'])
.pipe(
Expand All @@ -27,7 +27,7 @@ gulp.task('cjs', function () {
.pipe(gulp.dest('lib/'))
})

gulp.task('declaration', function () {
gulp.task('declaration', () => {
const tsProject = ts.createProject('tsconfig.json', {
declaration: true,
emitDeclarationOnly: true
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "A high quality and reliable React Hooks library.",
"scripts": {
"init": "pnpm install && pnpm run build",
"lint": "eslint ./ --fix",
"clean-dist": "rimraf 'packages/*/{lib,es,node_modules,dist}'",
"clean": "pnpm run clean-dist && rimraf node_modules",
"build": "pnpm -r --filter=./packages/* run build",
Expand All @@ -23,7 +24,7 @@
"@types/react": "^18.2.5",
"cross-env": "^7.0.3",
"del": "^5.1.0",
"eslint-config-lavy": "1.0.1-Alpha.1",
"eslint-config-lavy": "1.0.2-Alpha",
"fast-glob": "^3.2.12",
"fs-extra": "^11.1.1",
"gray-matter": "^4.0.3",
Expand All @@ -32,7 +33,7 @@
"gulp-typescript": "6.0.0-alpha.1",
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"lavy": "1.0.1-Alpha.1",
"lavy": "1.0.2-Alpha.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"rimraf": "^5.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { useDeepCompareEffect } from '../index'

describe('useDeepCompareEffect', () => {
let originalWarn: any
let mockWarn = jest.fn()
const mockWarn = jest.fn()

beforeEach(() => {
originalWarn = console.warn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('useDeepCompareMemoize', () => {
return false
}

for (let key of keys1) {
for (const key of keys1) {
if (!keys2.includes(key) || !deepEqual(obj1[key], obj2[key])) {
return false
}
Expand Down
Loading

0 comments on commit e054d48

Please sign in to comment.