Skip to content

Commit

Permalink
Merge pull request #40 from lordgiotto/upgrades-and-rework-2024-02
Browse files Browse the repository at this point in the history
Upgrades and Rework - 2024-02
  • Loading branch information
lordgiotto authored Feb 5, 2024
2 parents d3df39c + e15600d commit 39f1147
Show file tree
Hide file tree
Showing 35 changed files with 3,795 additions and 4,248 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/dist
92 changes: 12 additions & 80 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,20 @@ parserOptions:
ecmaFeatures:
ecmaVersion: 2020
jsx: true
env:
es2020: true
browser: true
node: true
settings:
react:
version: detect
extends:
- standard
- standard-with-typescript
- eslint:recommended
- plugin:react/recommended
- plugin:react-hooks/recommended
- prettier
rules:
comma-dangle:
- error
- arrays: always-multiline
objects: always-multiline
imports: always-multiline
exports: always-multiline
functions: never
indent: 'off'
multiline-ternary: 'off'
no-prototype-builtins: 'off'
no-useless-escape: 'off'
no-template-curly-in-string: 'off'
prefer-promise-reject-errors:
- error
- allowEmptyReject: true
quote-props:
- error
- consistent-as-needed
semi:
- error
- always
space-before-function-paren:
- error
- anonymous: never
named: never
asyncArrow: always
react/display-name: 'off'
react-hooks/exhaustive-deps: 'off'
react/no-unescaped-entities: 'off'
'no-prototype-builtins': off
overrides:
- files:
- '*.ts'
Expand All @@ -51,53 +27,9 @@ overrides:
project: './tsconfig.json'
plugins:
- '@typescript-eslint'
extends:
- plugin:@typescript-eslint/recommended
rules:
'@typescript-eslint/comma-dangle':
- error
- arrays: always-multiline
objects: always-multiline
imports: always-multiline
exports: always-multiline
functions: never
enums: always-multiline
generics: never
tuples: always-multiline
'@typescript-eslint/consistent-type-assertions':
- error
- assertionStyle: as
objectLiteralTypeAssertions: allow
'@typescript-eslint/consistent-type-definitions': 'off'
'@typescript-eslint/explicit-function-return-type': 'off'
'@typescript-eslint/indent': 'off'
'@typescript-eslint/member-delimiter-style':
- error
- multiline:
delimiter: semi
singleline:
delimiter: semi
requireLast: false
'@typescript-eslint/method-signature-style': 'off'
'@typescript-eslint/no-empty-interface': 'off'
'@typescript-eslint/no-floating-promises': 'off'
'@typescript-eslint/no-invalid-void-type': 'off'
'@typescript-eslint/no-non-null-assertion': 'off'
'@typescript-eslint/no-unused-vars': 'off'
'@typescript-eslint/prefer-includes': 'off'
'@typescript-eslint/prefer-nullish-coalescing': 'off'
'@typescript-eslint/prefer-optional-chain': 'off'
'@typescript-eslint/prefer-readonly': 'off'
'@typescript-eslint/prefer-reduce-type-parameter': 'off'
'@typescript-eslint/promise-function-async': 'off'
'@typescript-eslint/require-array-sort-compare':
- error
- ignoreStringArrays: true
'@typescript-eslint/return-await': 'off'
'@typescript-eslint/semi':
- error
- always
'@typescript-eslint/space-before-function-paren':
- error
- anonymous: never
named: never
asyncArrow: always
'@typescript-eslint/strict-boolean-expressions': 'off'
'@typescript-eslint/no-unnecessary-type-constraint': off
'@typescript-eslint/ban-ts-comment': off
'@typescript-eslint/no-var-requires': off
22 changes: 22 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Publish on NPM
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- run: yarn check:all
- run: yarn test
- run: yarn build
- run: yarn publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn check:all:staged
5 changes: 5 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module.exports = {
'**/*.(t|j)s': 'eslint',
'*': 'prettier -u --check',
'**/*': () => 'yarn check:ts',
};
5 changes: 0 additions & 5 deletions .npmignore

This file was deleted.

10 changes: 6 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"jsxSingleQuote": true,
"quoteProps": "consistent"
"quoteProps": "consistent",
"trailingComma": "es5",
"bracketSpacing": true,
"arrowParens": "always",
"bracketSameLine": false,
"jsxSingleQuote": true
}
3 changes: 3 additions & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version-git-tag true
version-tag-prefix "v"
version-git-message "Version bump %s"
Loading

0 comments on commit 39f1147

Please sign in to comment.