Skip to content

Commit

Permalink
Merge pull request #688 from OWASP/feat/add-eslint
Browse files Browse the repository at this point in the history
feat: add eslint to pre-commit
  • Loading branch information
commjoen authored Mar 10, 2023
2 parents 44e0e90 + 54c0e90 commit c843f33
Show file tree
Hide file tree
Showing 8 changed files with 3,943 additions and 91 deletions.
15 changes: 15 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
module.exports = {
env: {
browser: true,
commonjs: true,
es2021: true
},
extends: 'standard',
overrides: [
],
parserOptions: {
ecmaVersion: 'latest'
},
rules: {
}
}
6 changes: 6 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.9"
- uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
- name: Install npm dependencies
run: npm install
- uses: actions/cache@v3
name: Cache plugin dir
with:
Expand Down
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,9 @@ repos:
hooks:
- id: commitlint
stages: [commit-msg]
- repo: https://github.com/eslint/eslint
rev: v8.35.0
hooks:
- id: eslint
args:
- "--fix"
8 changes: 4 additions & 4 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// commitlint.config.js
module.exports = {
extends: [
"@commitlint/config-conventional", // scoped packages are not prefixed
],
};
extends: [
'@commitlint/config-conventional' // scoped packages are not prefixed
]
}
9 changes: 5 additions & 4 deletions js/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
function secret() {
var password = "jLJIQZM=" + 9 + "aG7l" + 6 + "LAQ=" + 2 + "UdiM" + 7;
return password;
}
/* eslint-disable no-unused-vars */
function secret () {
const password = 'jLJIQZM=' + 9 + 'aG7l' + 6 + 'LAQ=' + 2 + 'UdiM' + 7
return password
}
Loading

0 comments on commit c843f33

Please sign in to comment.