Skip to content

Commit 702f431

Browse files
zenflowlimonte
authored andcommitted
chore: fix "lint" script & add "lint-fix" script (#212)
Fixes: - Windows compatibility - cover more files (e.g. files in cypress dir & root dir)
1 parent 6da07a9 commit 702f431

File tree

6 files changed

+19
-10
lines changed

6 files changed

+19
-10
lines changed

.babelrc

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
{
22
"presets": [
3-
["@babel/preset-env", {
4-
"targets": {
5-
"chrome": "88",
6-
"firefox": "86",
7-
"safari": "12"
3+
[
4+
"@babel/preset-env",
5+
{
6+
"targets": {
7+
"chrome": "88",
8+
"firefox": "86",
9+
"safari": "12"
10+
}
811
}
9-
}],
12+
],
1013
["@babel/preset-react"]
1114
],
1215
"env": {

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
package-lock.json
21
node_modules/
32
coverage/
43
.cache/

.prettierignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
coverage/
3+
.cache/
4+
dist/
5+
6+
CHANGELOG.md

cypress/plugins/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
/**
1616
* @type {Cypress.PluginConfig}
1717
*/
18-
// eslint-disable-next-line no-unused-vars
18+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1919
module.exports = (on, config) => {
2020
// `on` is used to hook into various events Cypress emits
2121
// `config` is the resolved Cypress config

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"start": "vite",
1515
"cypress:open": "cypress open",
1616
"check-dts": "tsc src/sweetalert2-react-content.d.ts --lib dom,es6",
17-
"lint": "eslint src/**/*.{js,d.ts} test && prettier --check 'src/*.{js,d.ts}'",
17+
"lint": "eslint . --ext .js,.jsx,.d.ts && prettier . --check",
18+
"lint-fix": "eslint . --ext .js,.jsx,.d.ts --fix && prettier . --write",
1819
"test": "cypress run --headless",
1920
"build": "rollup --config",
2021
"prepublishOnly": "npm run build"

vite.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ import react from '@vitejs/plugin-react'
33

44
// https://vitejs.dev/config/
55
export default defineConfig({
6-
plugins: [react()]
6+
plugins: [react()],
77
})

0 commit comments

Comments
 (0)