Skip to content

Commit

Permalink
#2 - Lint code
Browse files Browse the repository at this point in the history
  • Loading branch information
FernandoCZanchetta committed Jul 5, 2024
1 parent d2d3678 commit ad8d11a
Show file tree
Hide file tree
Showing 4 changed files with 25,748 additions and 25,634 deletions.
115 changes: 115 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
module.exports = {
extends: ['plugin:@typescript-eslint/recommended', 'eslint:recommended'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',
},
root: true,
env: {
node: true,
jest: true,
browser: true,
},
ignorePatterns: [
'.eslintrc.js',
'**/migrations/*',
'*.spec.ts',
'dist/*',
'.angular/*',
'node_modules/*',
'.github/*',
],
rules: {
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'no-extra-parens': ['error', 'all'],
'no-unreachable-loop': 'error',
semi: ['error', 'never'],
'accessor-pairs': 'error',
'array-callback-return': ['error', { checkForEach: true }],
'block-scoped-var': 'error',
'consistent-return': 'warn',
'class-methods-use-this': 'warn',
curly: 'error',
'default-case': 'warn',
'default-case-last': 'error',
'default-param-last': 'error',
'dot-location': ['error', 'property'],
'dot-notation': 'error',
eqeqeq: 'warn',
'grouped-accessor-pairs': 'warn',
'guard-for-in': 'error',
'max-classes-per-file': 'error',
'no-caller': 'error',
'no-constructor-return': 'error',
'no-else-return': 'error',
'no-empty-function': ['error', { allow: ['constructors'] }],
'no-eq-null': 'error',
'no-eval': 'error',
'no-extra-bind': 'error',
'no-extra-label': 'error',
'no-implicit-coercion': ['error', { allow: ['!!', '+'] }],
'no-invalid-this': 'error',
'no-iterator': 'error',
'no-implicit-globals': 'error',
'no-implied-eval': 'error',
'no-use-before-define': 'error',
'vars-on-top': 'error',
'require-await': 'error',
'prefer-regex-literals': 'error',
'prefer-named-capture-group': 'warn',
'no-with': 'error',
'no-void': 'error',
'no-useless-return': 'error',
'no-useless-concat': 'error',
'no-unused-vars': ['off', { vars: 'local', args: 'none' }],
'no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
'block-spacing': 'error',
'brace-style': ['error', '1tbs', { allowSingleLine: true }],
camelcase: ['error', { ignoreGlobals: true }],
'function-paren-newline': ['error', 'consistent'],
'function-call-argument-newline': ['error', 'consistent'],
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
'func-call-spacing': 'error',
'eol-last': 'error',
'comma-style': 'error',
'comma-spacing': 'error',
'comma-dangle': ['error', 'always-multiline'],
indent: ['error', 2, { SwitchCase: 1 }],
'jsx-quotes': 'error',
'key-spacing': ['error', { beforeColon: false, afterColon: true }],
'max-len': [
'error',
{
code: 120,
ignoreUrls: true,
ignoreStrings: true,
ignoreRegExpLiterals: true,
},
],
'multiline-ternary': ['error', 'always-multiline'],
'no-lonely-if': 'error',
'no-trailing-spaces': 'error',
'no-unneeded-ternary': 'error',
'prefer-exponentiation-operator': 'error',
'spaced-comment': 'error',
'space-in-parens': 'error',
// 'space-before-function-paren': 'error',
'semi-style': 'error',
'semi-spacing': 'error',
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
'quote-props': ['error', 'consistent-as-needed'],
'prefer-arrow-callback': 'error',
'prefer-const': ['error', { destructuring: 'all' }],
'prefer-destructuring': ['error', { object: true, array: false }],
'object-shorthand': 'error',
'no-var': 'error',
'no-useless-rename': 'error',
'no-duplicate-imports': 'error',
'arrow-spacing': 'error',
'arrow-parens': ['error', 'as-needed'],
'arrow-body-style': ['warn', 'as-needed'],
},
}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@

---

![Projeto IoT (1)-1](https://github.com/FernandoCZanchetta/SEL0373/assets/97488352/8e2142ff-6f87-4c10-bd34-8ed7d33f6676)
![Projeto IoT (1)-2](https://github.com/FernandoCZanchetta/SEL0373/assets/97488352/364b2dd3-d43d-4e6a-90b2-a6c5d692b747)
![Projeto IoT (1)-1](https://github.com/FernandoCZanchetta/SEL0373/assets/97488352/8e2142ff-6f87-4c10-bd34-8ed7d33f6676) ![Projeto IoT (1)-2](https://github.com/FernandoCZanchetta/SEL0373/assets/97488352/364b2dd3-d43d-4e6a-90b2-a6c5d692b747)

<p align="center">
<a href="https://sharpprobe-fernando-zanchettas-projects.vercel.app/">
Expand Down
Loading

0 comments on commit ad8d11a

Please sign in to comment.