Skip to content
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

fixed eslint issues #3

Merged
merged 2 commits into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
73 changes: 73 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"plugins": ["@typescript-eslint", "import", "prettier"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.json", "./tsconfig-test.json"]
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:import/typescript",
"plugin:mocha/recommended",
"plugin:prettier/recommended"
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"]
},
"import/resolver": {
"node": {},
"typescript": {
"project": ["./tsconfig.json", "./tsconfig-test.json"],
"alwaysTryTypes": true
}
}
},
"ignorePatterns": ["*.js", "*.d.ts", "node_modules/", "coverage", "playground/*"],
"rules": {
"mocha/no-mocha-arrows": 0,
"mocha/no-setup-in-describe": 0,
"mocha/max-top-level-suites": ["warn", { "limit": 2 }],
"prettier/prettier": [
"error",
{
"endOfLine": "auto"
}
],
"@typescript-eslint/no-require-imports": ["error"],
"import/no-extraneous-dependencies": [
"error",
{
"devDependencies": ["**/test/**"],
"optionalDependencies": false,
"peerDependencies": true
}
],
"import/no-unresolved": ["error"],
"import/order": [
"warn",
{
"groups": ["builtin", "external"],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
}
}
],
"no-duplicate-imports": ["error"],
"no-shadow": ["off"],
"@typescript-eslint/no-shadow": ["error"],
"@typescript-eslint/no-explicit-any": ["off"],
"@typescript-eslint/ban-types": ["off"],
"@typescript-eslint/no-unused-vars": ["off"],
"key-spacing": ["error"],
"no-multiple-empty-lines": ["error"],
"@typescript-eslint/no-floating-promises": ["off"],
"no-return-await": ["off"],
"@typescript-eslint/return-await": ["error"],
"no-trailing-spaces": ["error"],
"dot-notation": ["error"],
"no-bitwise": ["error"]
}
}
9 changes: 5 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
versioning-strategy: lockfile-only
directory: /
- package-ecosystem: "npm"
directory: "/" # Location of package manifests
schedule:
interval: daily
interval: "daily"
commit-message:
prefix: "build"
1 change: 1 addition & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

26 changes: 26 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: checks

on: [pull_request]

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16

- name: Install dependencies
run: npm ci

- name: Npm run test
run: npm run lint
call-security-scanners-workflow:
uses: affinidi/pipeline-security/.github/workflows/security-scanners.yml@feat/check-inherit
with:
config-path: .github/labeler.yml
secrets: inherit
82 changes: 0 additions & 82 deletions .github/workflows/codeql.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/github-release-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Public Release to npmjs.com

on:
push:
branches:
- main
- beta

jobs:
release:
runs-on: ubuntu-latest
environment:
name: publishEnv
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
scope: '@affinidi'

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Run release
run: npx semantic-release@21
env:
NODE_AUTH_TOKEN: ${{ secrets.PUBLIC_NPM_NODE_AUTH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
11 changes: 11 additions & 0 deletions .github/workflows/gitleaks-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: gitleaks

on: [pull_request]

jobs:
gitleaks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: gitleaks-action
uses: zricethezav/[email protected]
7 changes: 2 additions & 5 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"printWidth": 100,
"printWidth": 120,
"semi": false,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"jsxBracketSameLine": true,
"arrowParens": "avoid"
"trailingComma": "all"
}
Loading
Loading