-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OS-593: refactors repo for linting and linting during workflows (#8)
* ci: add linting and fix package manager warnings * docs: improved pr template * ci: rename job * ci: improve commands and workflows * ci: fix commands * style: formatting * build: improved gitignore * style(OS-593): improves eslint config Moves linting to the root of the repository and extends this config for each package * ci(OS-593): improves linting and testing for subgraph reconfigures formatting-linting to be callable by other workflows * ci(OS-593): fix missing dependency installation fixes missing dependency installation for subgraph during linting * chore(OS-593): adds missing peerDependecies in subgraph --------- Co-authored-by: Mathias Scherer <[email protected]>
- Loading branch information
1 parent
0cf95e5
commit e446956
Showing
19 changed files
with
1,456 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
root: true | ||
extends: | ||
- 'eslint:recommended' | ||
- 'plugin:@typescript-eslint/eslint-recommended' | ||
- 'plugin:@typescript-eslint/recommended' | ||
- 'prettier' | ||
plugins: | ||
- '@typescript-eslint' | ||
rules: | ||
'@typescript-eslint/no-floating-promises': | ||
- error | ||
- ignoreIIFE: true | ||
ignoreVoid: true | ||
'@typescript-eslint/no-inferrable-types': 'off' | ||
'@typescript-eslint/no-explicit-any': 'off' | ||
'@typescript-eslint/no-unused-vars': | ||
- error | ||
- argsIgnorePattern: '_' | ||
varsIgnorePattern: '_' | ||
|
||
ignorePatterns: | ||
- '*.log' | ||
- '*.env' | ||
- '.env' | ||
- '.DS_Store' | ||
- .pnp.* | ||
- 'node_modules' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: 'formatting & linting' | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
jobs: | ||
checks: | ||
runs-on: 'ubuntu-latest' | ||
steps: | ||
- name: 'Check out the repo' | ||
uses: 'actions/checkout@v3' | ||
|
||
- name: 'Install Node.js' | ||
uses: 'actions/setup-node@v3' | ||
with: | ||
cache: 'yarn' | ||
node-version: 18 | ||
|
||
- name: 'Install the dependencies' | ||
run: 'yarn install' | ||
|
||
- name: 'Install subgraph dependencies' | ||
run: 'cd subgraph/ && yarn install' | ||
|
||
- name: 'Lint subgraph' | ||
run: 'yarn lint:subgraph:ts >> $GITHUB_STEP_SUMMARY' | ||
|
||
- name: 'Check code formatting' | ||
run: yarn prettier:check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# directories | ||
.coverage_artifacts | ||
.coverage_cache | ||
.coverage_contracts | ||
artifacts | ||
build | ||
cache | ||
coverage | ||
deployments | ||
dist | ||
node_modules | ||
typechain | ||
types | ||
imported | ||
generated | ||
*/js-client/test/integration/*.test.ts | ||
|
||
# files | ||
*.env | ||
*.log | ||
.DS_Store | ||
.pnp.* | ||
coverage.json | ||
package-lock.json | ||
pnpm-lock.yaml | ||
yarn.lock | ||
extended-schema.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "@aragon/osx-commons-repo", | ||
"license": "AGPL-3.0-or-later", | ||
"private": true, | ||
"devDependencies": { | ||
"@trivago/prettier-plugin-sort-imports": "^4.2.0", | ||
"@typescript-eslint/eslint-plugin": "^5.59.8", | ||
"@typescript-eslint/parser": "^5.44.0", | ||
"@types/node": "^18.7.15", | ||
"eslint": "^8.51.0", | ||
"eslint-config-prettier": "^8.8.0", | ||
"prettier": "^2.4.1", | ||
"prettier-plugin-solidity": "^1.1.1", | ||
"typescript": "^4.9.5" | ||
}, | ||
"scripts": { | ||
"lint": "yarn run lint:subgraph:ts", | ||
"lint:subgraph:ts": "eslint --ext .js,.ts ./subgraph/", | ||
"prettier:check": "prettier --check \"**/*.{js,json,md,sol,ts,yml}\"", | ||
"prettier:write": "prettier --write \"**/*.{js,json,md,sol,ts,yml}\"" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
parser: '@typescript-eslint/parser' | ||
parserOptions: | ||
project: './subgraph/tsconfig.json' | ||
|
||
# Custom eslint settings for the subgraph can be defined here | ||
ignorePatterns: | ||
- imported/ | ||
- generated/ | ||
- tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
{ | ||
"extends": "./node_modules/assemblyscript/std/assembly.json", | ||
"include": ["index.ts"], | ||
"exclude": ["node_modules"] | ||
} |
Oops, something went wrong.