Skip to content

Commit

Permalink
Merge pull request #26936 from mshima/eslint
Browse files Browse the repository at this point in the history
add more eslint rules to base
  • Loading branch information
DanielFran authored Aug 9, 2024
2 parents ecad4e7 + ec1b0ae commit 7af9a9d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
4 changes: 0 additions & 4 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,13 @@ export default ts.config(
},
{
rules: {
'eol-last': 'error',
quotes: ['error', 'single', { avoidEscape: true }],
semi: ['error', 'always'],
eqeqeq: ['error', 'smart'],
'no-use-before-define': ['error', 'nofunc'],
'no-multi-str': 'error',
'no-irregular-whitespace': 'error',
'no-console': 'error',
'no-template-curly-in-string': 'error',
'no-nested-ternary': 'error',
'lines-between-class-members': ['error', 'always', { exceptAfterSingleLine: true }],
'no-restricted-syntax': [
'error',
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class DataUtils {
};
observer.error(error);
} else {
const fieldContentType: string = field + 'ContentType';
const fieldContentType = field + 'ContentType';
this.toBase64(file, (base64Data: string) => {
editForm.patchValue({
[field]: base64Data,
Expand Down
13 changes: 13 additions & 0 deletions lib/eslint/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ const baseConfig = {
import: fixupPluginRules(imports),
},
rules: {
'dot-notation': 'error',
eqeqeq: ['error', 'always', { null: 'ignore' }],
'no-else-return': 'error',
'no-regex-spaces': 'error',
'no-useless-computed-key': 'error',
'no-useless-return': 'error',
'no-var': 'error',
'object-shorthand': 'error',
'prefer-const': 'error',
'prefer-destructuring': ['error', { array: false }],
'prefer-object-has-own': 'error',
'prefer-object-spread': 'error',
'prefer-template': 'error',
'sort-imports': ['error', { ignoreDeclarationSort: true }],

// Configure unused-imports rule
Expand Down

0 comments on commit 7af9a9d

Please sign in to comment.