Skip to content

feat(js-client)!: Adding strictes eslint and ts config to all packages [fixes DXJ-464] #355

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 49 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
baac1be
introduce eslint
akim-bow Oct 2, 2023
c6abda1
Fix all eslint errors
akim-bow Oct 6, 2023
3bcc732
Eslint fix and some touches
akim-bow Oct 6, 2023
572152e
Fix tests
akim-bow Oct 6, 2023
e421552
Fix misc errors
akim-bow Oct 7, 2023
1d185a7
change semver
akim-bow Oct 9, 2023
773b652
change semver #2
akim-bow Oct 9, 2023
bde42e5
Fix path
akim-bow Oct 9, 2023
3c795c8
Fix path #2
akim-bow Oct 9, 2023
1f49947
freeze lock file in CI
akim-bow Oct 9, 2023
ebf2191
fix package install
akim-bow Oct 9, 2023
3df618b
Fix formatting of surrounding files
akim-bow Oct 9, 2023
9163f3a
Add empty prettier config
akim-bow Oct 9, 2023
b0c9b5d
Fix formatting
akim-bow Oct 9, 2023
ebd9970
Fix build errors
akim-bow Oct 9, 2023
5026ea5
Remove unused deps
akim-bow Oct 10, 2023
c94cf87
remove changelog from formatting
akim-bow Oct 10, 2023
dd4ef4e
deps cleanup
akim-bow Oct 10, 2023
fc33ce3
make resource importers async
akim-bow Oct 10, 2023
2abed24
Refactor
akim-bow Oct 10, 2023
4ae649f
Fix error message
akim-bow Oct 10, 2023
8d51ab1
remove comment
akim-bow Oct 10, 2023
7ff7199
more refactoring
akim-bow Oct 10, 2023
ad52a1d
Update packages/core/js-client/src/compilerSupport/registerService.ts
akim-bow Oct 10, 2023
20c9597
refactoring
akim-bow Oct 10, 2023
2fd23f0
refactoring fix
akim-bow Oct 10, 2023
867d559
Merge remote-tracking branch 'origin/dxj-464' into dxj-464
akim-bow Oct 10, 2023
12c790e
optimize import
akim-bow Oct 11, 2023
b1a79b1
Update packages/@tests/smoke/node/src/index.ts
akim-bow Oct 11, 2023
f97397e
Revert package
akim-bow Oct 11, 2023
fcb9168
Merge remote-tracking branch 'origin/dxj-464' into dxj-464
akim-bow Oct 11, 2023
c928041
Merge branch 'master' into dxj-464
akim-bow Oct 11, 2023
b047938
Fix pnpm lock
akim-bow Oct 11, 2023
138c555
Lint-fix
akim-bow Oct 11, 2023
49d9898
Fix CI
akim-bow Oct 11, 2023
51229f3
Update tests
akim-bow Oct 12, 2023
72ad2df
Fix build
akim-bow Oct 12, 2023
7ea5809
Fix import
akim-bow Oct 12, 2023
91a9859
Use forked threads dep
akim-bow Oct 12, 2023
f0a449a
Use fixed version
akim-bow Oct 13, 2023
887123e
Merge branch 'master' into dxj-464
akim-bow Oct 13, 2023
b74c54b
Update threads
akim-bow Oct 16, 2023
2e1302a
Fix lint
akim-bow Oct 16, 2023
2157bcc
Fix test
akim-bow Oct 16, 2023
4971790
Fix test
akim-bow Oct 16, 2023
0b888f2
Add polyfill for assert
akim-bow Oct 16, 2023
381d20c
Add subpath import
akim-bow Oct 16, 2023
61a6632
Fix tests
akim-bow Oct 16, 2023
83af1f4
Fix deps
akim-bow Oct 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .editorconfig

This file was deleted.

133 changes: 133 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
{
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2022,
"project": ["./tsconfig.eslint.json"],
"sourceType": "module"
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/strict-type-checked",
"plugin:import/recommended",
"plugin:import/typescript",
"prettier"
],
"plugins": [
"@typescript-eslint",
"import",
"license-header",
"unused-imports"
],
"ignorePatterns": ["**/node_modules/**/*", "**/dist/**/*"],
"rules": {
"eqeqeq": [
"error",
"always",
{
"null": "ignore"
}
],
"no-console": ["error"],
"arrow-body-style": ["error", "always"],
"no-empty": [
"error",
{
"allowEmptyCatch": true
}
],
"curly": ["error", "all"],
"no-unused-expressions": ["error"],
"dot-notation": ["off"],
"object-curly-spacing": ["error", "always"],
"padding-line-between-statements": [
"error",
{
"blankLine": "always",
"prev": "multiline-expression",
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": "multiline-expression"
},
{
"blankLine": "always",
"prev": "multiline-block-like",
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": "multiline-block-like"
},
{
"blankLine": "always",
"prev": "multiline-const",
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": "multiline-const"
},
{
"blankLine": "always",
"prev": "multiline-let",
"next": "*"
},
{
"blankLine": "always",
"prev": "*",
"next": "multiline-let"
},
{
"blankLine": "any",
"prev": "case",
"next": "case"
}
],
"import/extensions": ["error", "ignorePackages"],
"import/no-unresolved": "off",
"import/no-cycle": ["error"],
"import/order": [
"error",
{
"newlines-between": "always",
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"node/no-unsupported-features/es-syntax": "off",
"node/no-unpublished-import": "off",
"node/no-missing-import": "off",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "no-public"
}
],
"@typescript-eslint/strict-boolean-expressions": [
"error",
{
"allowString": false,
"allowNumber": false,
"allowNullableObject": false,
"allowNullableBoolean": false,
"allowNullableString": false,
"allowNullableNumber": false,
"allowAny": false
}
],
"@typescript-eslint/consistent-type-assertions": [
"error",
{
"assertionStyle": "never"
}
],
"unused-imports/no-unused-imports": "error",
"license-header/header": ["error", "./resources/license-header.js"]
}
}
9 changes: 6 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ jobs:
registry-url: "https://npm.fluence.dev"
cache: "pnpm"

- run: pnpm -r i
- run: pnpm -r build
- run: pnpm lint-check


- name: Override dependencies
uses: fluencelabs/github-actions/pnpm-set-dependency@main
with:
Expand All @@ -97,10 +102,8 @@ jobs:
"@fluencelabs/marine-js": "${{ inputs.marine-js-version }}"
}

- run: pnpm -r --no-frozen-lockfile i
- run: pnpm -r build
- run: pnpm -r i
- run: pnpm -r test

- name: Dump rust-peer logs
if: always()
uses: jwalton/gh-docker-logs@v2
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*.log
.idea
.eslintcache

# Dependency directories
node_modules/
Expand Down
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,10 @@
.github
.eslintcache
pnpm-lock.yaml

**/node_modules
**/dist
**/build
**/public

**/CHANGELOG.md
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
8 changes: 0 additions & 8 deletions .prettierrc.cjs

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ Things you need to know:

### Contributor License Agreement

When you contribute, you have to be aware that your contribution is covered by **[Apache License 2.0](./LICENSE)**, but might relicensed under few other software licenses mentioned in the **Contributor License Agreement**. In particular, you need to agree to the Contributor License Agreement. If you agree to its content, you simply have to click on the link posted by the CLA assistant as a comment to the pull request. Click it to check the CLA, then accept it on the following screen if you agree to it. The CLA assistant will save this decision for upcoming contributions and will notify you if there is any change to the CLA in the meantime.
When you contribute, you have to be aware that your contribution is covered by **[Apache License 2.0](./LICENSE)**, but might relicensed under few other software licenses mentioned in the **Contributor License Agreement**. In particular, you need to agree to the Contributor License Agreement. If you agree to its content, you simply have to click on the link posted by the CLA assistant as a comment to the pull request. Click it to check the CLA, then accept it on the following screen if you agree to it. The CLA assistant will save this decision for upcoming contributions and will notify you if there is any change to the CLA in the meantime.
Loading