Skip to content

Commit

Permalink
[E4E-0]: Fix some bad code/formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCleric committed Dec 15, 2021
1 parent 19895af commit 153c536
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
24 changes: 12 additions & 12 deletions .nesteslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@ const defaultConfig = require('./index');
const tsConfig = defaultConfig.overrides.filter(o => o.files === ['**/*.ts', '**/*.tsx'])[0];

const moduleConfig = {
...tsConfig,
files: ['**/*.module.ts'],
rules: {
...tsConfig.rules,
'@typescript-eslint/no-extraneous-class': 'off',
},
...tsConfig,
files: ['**/*.module.ts'],
rules: {
...tsConfig.rules,
'@typescript-eslint/no-extraneous-class': 'off',
},
};

const entityConfig = {
...tsConfig,
files: ['**/*.entity.ts'],
rules: {
...tsConfig.rules,
camel_case: 'off',
},
...tsConfig,
files: ['**/*.entity.ts'],
rules: {
...tsConfig.rules,
camel_case: 'off',
},
};

module.exports = { ...defaultConfig, overrides: [...defaultConfig.overrides, moduleConfig, entityConfig] };
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config.insertPragma = false;
config.requirePragma = false;
config.overrides = [
{
files: ["*.jsx", "*.tsx"],
files: ['*.jsx', '*.tsx'],
options: {
printWidth: 160,
},
Expand Down
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ const prettierConfig = require('./.prettierrc');

const overridePrintWidth =
prettierConfig && prettierConfig.overrides && prettierConfig.overrides.length > 0
? Math.max(prettierConfig.overrides.map(o => o.printWidth))
? Math.max(...prettierConfig.overrides.map(o => o.options.printWidth))
: 0;
const printWidth = Math.max([prettierConfig.printWidth || 160, overridePrintWidth]);
const printWidth = Math.max(prettierConfig.printWidth, overridePrintWidth);

const baseConfig = {
extends: [
Expand Down

0 comments on commit 153c536

Please sign in to comment.