Skip to content

Commit

Permalink
2024 version
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed Aug 4, 2024
1 parent f7769ce commit 083bc2e
Show file tree
Hide file tree
Showing 41 changed files with 2,572 additions and 3,366 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 }}
42 changes: 20 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
# 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*

# VSC - Git Lens
.history
node_modules
dist
dist-ssr
*.local

# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
6 changes: 5 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"editor.codeActionsOnSave": { "source.fixAll.eslint": true },
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.insertSpaces": 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.

10 changes: 1 addition & 9 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,11 @@
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.ico" />

<link
async
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/semantic-ui@2/dist/semantic.min.css"
/>
<script src="https://cdn.jsdelivr.net/npm/semantic-ui-react/dist/umd/semantic-ui-react.min.js"></script>

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Contador Context React</title>
</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 083bc2e

Please sign in to comment.