Skip to content

Commit

Permalink
2024 update
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed Jul 31, 2024
1 parent 1bebba2 commit c131af8
Show file tree
Hide file tree
Showing 32 changed files with 2,512 additions and 3,149 deletions.
64 changes: 2 additions & 62 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,73 +3,13 @@ module.exports = {
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parserOptions: { ecmaVersion: 'latest', sourceType: 'module' },
settings: { react: { version: '18.2' } },
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'semi': ['error', 'never'],
'prefer-const': [
'warn',
{
'destructuring': 'any',
'ignoreReadBeforeAssign': false
}
],
'getter-return': ['error'],
'no-async-promise-executor': ['warn'],
'no-cond-assign': ['warn', 'except-parens'],
'no-dupe-keys': ['error'],
'no-empty': ['warn'],
'no-ex-assign': ['error'],
'no-extra-boolean-cast': [
'error',
{
'enforceForLogicalOperands': true
}
],
'no-extra-parens': ['warn', 'all'],
'no-func-assign': ['error'],
'no-import-assign': ['error'],
'no-inner-declarations': ['error', 'both'],
'no-obj-calls': ['error'],
'no-promise-executor-return': ['error'],
'no-sparse-arrays': ['error'],
'no-template-curly-in-string': ['error'],
'no-unreachable': ['error'],
'no-unreachable-loop': ['error'],
'no-unsafe-optional-chaining': ['error'],
'require-atomic-updates': ['error'],
'use-isnan': ['error'],
'block-scoped-var': ['error'],
'consistent-return': ['error'],
'default-param-last': ['warn'],
'no-alert': ['error'],
'no-caller': ['error'],
'no-constructor-return': ['error'],
'no-global-assign': ['error'],
'no-lone-blocks': ['warn'],
'no-multi-spaces': ['warn'],
'no-new': ['warn'],
'no-param-reassign': ['error'],
'no-proto': ['warn'],
'no-redeclare': ['error'],
'no-return-assign': ['error'],
'no-return-await': ['warn'],
'no-self-assign': ['error'],
'no-sequences': ['warn'],
'no-useless-catch': ['warn'],
'no-useless-return': ['error'],
'no-void': ['error'],
'no-with': ['error'],
'no-undef': ['off'],
'react/display-name': ['off'],
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Cache node modules
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -27,8 +27,7 @@ jobs:
- run: npm run build --if-present
- name: Run the tests and generate coverage report
run: npm test -- --coverage
- name: Adding coverage badge
uses: demyanets/angular-coverage-badges-action@v1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.5.0
with:
coverage-summary-path: ./coverage/coverage-summary.json
github_token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
43 changes: 22 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,27 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# VSC - Git Lens
.history
.history
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"editor.codeActionsOnSave": { "source.fixAll.eslint": true },
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.formatOnSave": true,
}
6 changes: 0 additions & 6 deletions badges/coverage/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion badges/coverage/coverage-branches.svg

This file was deleted.

1 change: 0 additions & 1 deletion badges/coverage/coverage-functions.svg

This file was deleted.

1 change: 0 additions & 1 deletion badges/coverage/coverage-lines.svg

This file was deleted.

1 change: 0 additions & 1 deletion badges/coverage/coverage-statements.svg

This file was deleted.

1 change: 0 additions & 1 deletion badges/coverage/coverage.svg

This file was deleted.

2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
15 changes: 0 additions & 15 deletions jsconfig.json

This file was deleted.

Loading

0 comments on commit c131af8

Please sign in to comment.