eslint for bruno-app and bruno-electron packages (#4622)

Co-authored-by: lohit <lohit@usebruno.com>
This commit is contained in:
lohit
2025-05-08 18:09:55 +05:30
committed by GitHub
parent 3326784315
commit 967170a7b2
4 changed files with 2016 additions and 22 deletions

3
.husky/pre-commit Executable file
View File

@@ -0,0 +1,3 @@
# .husky/pre-commit
npx lint-staged

41
eslint.config.js Normal file
View File

@@ -0,0 +1,41 @@
// eslint.config.js
const { defineConfig } = require("eslint/config");
const globals = require("globals");
module.exports = defineConfig([
{
files: ["packages/bruno-app/**/*.{js,jsx,ts}"],
ignores: ["**/*.config.js"],
languageOptions: {
globals: {
...globals.browser,
...globals.jest,
global: false,
require: false,
Buffer: false,
process: false
},
parserOptions: {
ecmaFeatures: {
jsx: true,
},
},
},
rules: {
"no-undef": "error",
},
},
{
files: ["packages/bruno-electron/**/*.{js}"],
ignores: ["**/*.config.js"],
languageOptions: {
globals: {
...globals.node,
...globals.jest,
},
},
rules: {
"no-undef": "error",
},
}
]);

1985
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -24,9 +24,12 @@
"@types/jest": "^29.5.11",
"@types/lodash-es": "^4.17.12",
"concurrently": "^8.2.2",
"eslint": "^9.26.0",
"fs-extra": "^11.1.1",
"globals": "^16.1.0",
"husky": "^8.0.3",
"jest": "^29.2.0",
"lint-staged": "^15.5.2",
"lodash-es": "^4.17.21",
"pretty-quick": "^3.1.3",
"randomstring": "^1.2.2",
@@ -59,7 +62,8 @@
"test:e2e": "npx playwright test",
"test:report": "npx playwright show-report",
"test:prettier:web": "npm run test:prettier --workspace=packages/bruno-app",
"prepare": "husky install"
"prepare": "husky install",
"lint": "npx eslint ./"
},
"overrides": {
"rollup": "3.29.5",
@@ -68,5 +72,8 @@
"json-schema-typed": "8.0.1"
}
}
},
"lint-staged": {
"packages/**/*.{js,jsx,ts,tsx}": "npm run lint"
}
}