Skip to content

Commit fa04bbe

Browse files
committed
remove boring eslint, streamline package.json
1 parent 563c0f5 commit fa04bbe

12 files changed

+129
-2166
lines changed

.eslintignore

-1
This file was deleted.

.eslintrc.json

-25
This file was deleted.

.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,8 @@ node_modules
1212
!.vscode/extensions.json
1313
.idea
1414
.DS_Store
15-
.eslintcache
1615

1716
cypress/videos
1817

1918
dist
20-
*.tgz
19+
*.tgz

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ cy.get('h1')
6363
})
6464
```
6565

66-
But scenarios can be disparate and more complex. Bottom line is that if you find yourself using `cy.wait()` as last resort to obtain values or wait for DOM/CSS properties to be idle, this package might be for you.
66+
But scenarios can be disparate and more complex. Bottom line is that if you find yourself using `cy.wait()` as last resort to obtain values or to wait for DOM/CSS properties to be idle, this package might be useful.
6767

6868
<br />
6969

cypress.config.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import { defineConfig } from 'cypress';
1+
import { defineConfig } from 'cypress'
22

33
export default defineConfig({
4-
component: {
5-
viewportWidth: 1280,
6-
viewportHeight: 720,
7-
experimentalWebKitSupport: true,
8-
devServer: {
9-
framework: 'react',
10-
bundler: 'vite',
11-
},
12-
},
13-
});
4+
component: {
5+
viewportWidth: 1280,
6+
viewportHeight: 720,
7+
experimentalWebKitSupport: true,
8+
devServer: {
9+
framework: 'react',
10+
bundler: 'vite',
11+
},
12+
},
13+
})

cypress/support/commands.ts

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
1-
import '../../src/index';
1+
import '../../src/index'
22

33
declare global {
4-
// eslint-disable-next-line @typescript-eslint/no-namespace
5-
namespace Cypress {
6-
interface Chainable {
7-
expectError(done: () => void, message: string): boolean;
8-
}
9-
}
4+
namespace Cypress {
5+
interface Chainable {
6+
expectError(done: () => void, message: string): boolean
7+
}
8+
}
109
}
1110

1211
function normalize(str: string): string {
13-
return str.replace(/\s+/g, ' ');
12+
return str.replace(/\s+/g, ' ')
1413
}
1514

1615
Cypress.Commands.add('expectError', (end: Mocha.Done, message) => {
17-
cy.on('fail', (err) => {
18-
expect(normalize(err.message)).to.eq(normalize(message));
19-
end(); // Complete
20-
return false; // Prevent failure
21-
});
22-
});
16+
cy.on('fail', (err) => {
17+
expect(normalize(err.message)).to.eq(normalize(message))
18+
end() // Complete
19+
return false // Prevent failure
20+
})
21+
})

cypress/support/component.ts

+8-9
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
import './commands';
2-
import { mount } from 'cypress/react18';
1+
import './commands'
2+
import { mount } from 'cypress/react18'
33

44
declare global {
5-
// eslint-disable-next-line @typescript-eslint/no-namespace
6-
namespace Cypress {
7-
interface Chainable {
8-
mount: typeof mount;
9-
}
10-
}
5+
namespace Cypress {
6+
interface Chainable {
7+
mount: typeof mount
8+
}
9+
}
1110
}
1211

13-
Cypress.Commands.add('mount', mount);
12+
Cypress.Commands.add('mount', mount)

package.json

+60-69
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,62 @@
11
{
2-
"name": "cypress-wait-frames",
3-
"version": "0.9.4",
4-
"private": false,
5-
"description": "Cypress command to correctly wait for any CSS/DOM properties to be idle after n frames.",
6-
"keywords": [
7-
"cypress",
8-
"cypress-command",
9-
"cypress-wait-frames",
10-
"cypress-wait",
11-
"cypress-raf",
12-
"cypress-idle",
13-
"cypress-frames",
14-
"cypress-promise",
15-
"cypress-scroll",
16-
"cypress-css"
17-
],
18-
"scripts": {
19-
"build": "rimraf dist && tsc && vite build",
20-
"postbuild": "tsc src/types.ts --declaration --emitDeclarationOnly && cpy src/types.d.ts --flat dist --rename index.d.ts && rimraf src/types.d.ts",
21-
"dev": "cypress open --component",
22-
"prepare": "husky install",
23-
"test": "cypress run --component"
24-
},
25-
"homepage": "https://github.com/smastrom/cypress-wait-frames/",
26-
"bugs": {
27-
"url": "https://github.com/smastrom/cypress-wait-frames/issues"
28-
},
29-
"repository": {
30-
"type": "git",
31-
"url": "https://github.com/smastrom/cypress-wait-frames.git"
32-
},
33-
"license": "MIT",
34-
"author": {
35-
"name": "Simone Mastromattei",
36-
"email": "smastrom@proton.me"
37-
},
38-
"main": "dist/index.js",
39-
"module": "dist/index.mjs",
40-
"types": "dist/index.d.ts",
41-
"files": [
42-
"dist/*"
43-
],
44-
"lint-staged": {
45-
"*.{ts,tsx}": "eslint --fix",
46-
"*.{ts,tsx,md}": "prettier --write"
47-
},
48-
"devDependencies": {
49-
"@types/node": "^18.19.3",
50-
"@types/react": "^18.2.43",
51-
"@types/react-dom": "^18.2.17",
52-
"@typescript-eslint/eslint-plugin": "^5.62.0",
53-
"@typescript-eslint/parser": "^5.62.0",
54-
"@vitejs/plugin-react-swc": "^3.5.0",
55-
"cpy-cli": "^4.2.0",
56-
"csstype": "^3.1.3",
57-
"cypress": "^12.17.4",
58-
"eslint": "^8.55.0",
59-
"eslint-plugin-cypress": "^2.15.1",
60-
"eslint-plugin-react": "^7.33.2",
61-
"husky": "^8.0.3",
62-
"lint-staged": "^13.3.0",
63-
"playwright-webkit": "^1.40.1",
64-
"prettier": "^2.8.8",
65-
"react": "^18.2.0",
66-
"react-dom": "^18.2.0",
67-
"rimraf": "^4.4.1",
68-
"typescript": "^4.9.5",
69-
"vite": "^4.5.1"
70-
}
2+
"name": "cypress-wait-frames",
3+
"version": "0.9.4",
4+
"private": false,
5+
"description": "Cypress command to correctly wait for any CSS/DOM properties to be idle after n frames.",
6+
"keywords": [
7+
"cypress",
8+
"cypress-command",
9+
"cypress-wait-frames",
10+
"cypress-wait",
11+
"cypress-raf",
12+
"cypress-idle",
13+
"cypress-frames",
14+
"cypress-promise",
15+
"cypress-scroll",
16+
"cypress-css"
17+
],
18+
"homepage": "https://github.com/smastrom/cypress-wait-frames/",
19+
"bugs": {
20+
"url": "https://github.com/smastrom/cypress-wait-frames/issues"
21+
},
22+
"repository": {
23+
"type": "git",
24+
"url": "https://github.com/smastrom/cypress-wait-frames.git"
25+
},
26+
"license": "MIT",
27+
"author": {
28+
"name": "Simone Mastromattei",
29+
"email": "smastrom@proton.me"
30+
},
31+
"main": "dist/index.js",
32+
"module": "dist/index.mjs",
33+
"types": "dist/index.d.ts",
34+
"files": [
35+
"dist/*"
36+
],
37+
"scripts": {
38+
"build": "rm -rf dist && tsc && vite build",
39+
"postbuild": "tsc src/types.ts --declaration --emitDeclarationOnly --outFile dist/index.d.ts",
40+
"dev": "cypress open --component",
41+
"prepare": "husky install",
42+
"test": "cypress run --component --browser chrome"
43+
},
44+
"lint-staged": {
45+
"*.{ts,tsx,md}": "prettier --write"
46+
},
47+
"devDependencies": {
48+
"@types/node": "^18.19.3",
49+
"@types/react": "^18.2.43",
50+
"@types/react-dom": "^18.2.17",
51+
"csstype": "^3.1.3",
52+
"cypress": "^12.17.4",
53+
"husky": "^8.0.3",
54+
"lint-staged": "^13.3.0",
55+
"playwright-webkit": "^1.40.1",
56+
"prettier": "^2.8.8",
57+
"react": "^18.2.0",
58+
"react-dom": "^18.2.0",
59+
"typescript": "^4.9.5",
60+
"vite": "^4.5.1"
61+
}
7162
}

0 commit comments

Comments
 (0)