Skip to content

Commit

Permalink
Merge pull request #87 from keep-network/lint
Browse files Browse the repository at this point in the history
Update linting configuration
  • Loading branch information
lukasz-zimnoch authored Aug 20, 2020
2 parents fe340e1 + 60c9df5 commit 422177a
Show file tree
Hide file tree
Showing 44 changed files with 2,704 additions and 2,457 deletions.
7 changes: 2 additions & 5 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"extends": "eslint-config-keep",
"extends": ["eslint-config-keep", "prettier"],
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module"
Expand All @@ -9,9 +9,6 @@
"mocha": true
},
"rules": {
"semi": [
2,
"never"
]
"new-cap": "off"
}
}
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install dependencies
run: npm install
- name: Run JS linter
run: npm run js:lint
run: npm run lint:js

lint-sol:
runs-on: ubuntu-latest
Expand All @@ -27,4 +27,4 @@ jobs:
- name: Install dependencies
run: npm install
- name: Run Solidity linter
run: npm run sol:lint
run: npm run lint:sol
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
build/
.vscode
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
hooks:
- id: lint-js
name: "lint js"
entry: /usr/bin/env bash -c "npm run js:lint"
entry: /usr/bin/env bash -c "npm run lint:js"
files: '\.js$'
language: script
description: "Checks JS code according to the package's linter configuration"
- id: lint-sol
name: "lint solidity"
entry: /usr/bin/env bash -c "npm run sol:lint"
entry: /usr/bin/env bash -c "npm run lint:sol"
files: '\.sol$'
language: script
description: "Checks Solidity code according to the package's linter configuration"
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"tabWidth": 2,
"useTabs": false,
"semi": false,
"trailingComma": "all"
}
12 changes: 10 additions & 2 deletions .soliumrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@
"security"
],
"rules": {
"security/no-block-members": "off"
"security/no-block-members": [
"off",
[
"timestamp"
]
],
"indentation": "off",
"security/no-call-value": "off",
"security/no-inline-assembly": "off"
}
}
}
Loading

0 comments on commit 422177a

Please sign in to comment.