Skip to content

Commit

Permalink
feat: fix eslint bracket
Browse files Browse the repository at this point in the history
  • Loading branch information
khoilen committed Jan 4, 2025
1 parent b8d9dc9 commit 222018a
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 42 deletions.
22 changes: 13 additions & 9 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
{
"endOfLine": "auto",
"jsxBracketSameLine": true,
"importOrder": ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
"importOrder": [
"^@core/(.*)$",
"^@server/(.*)$",
"^@ui/(.*)$",
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"importOrderSideEffects": true,
"importOrderCaseInsensitive": true,
"plugins": ["@trivago/prettier-plugin-sort-imports"],
"printWidth": 80,
"tabWidth": 4,
"useTabs": false,
"semi": true,
"semi": false,
"trailingComma": "all",
"arrowParens": "always",
"singleQuote": true,
"trailingComma": "es5",
"printWidth": 70,
"endOfLine": "auto",
"bracketSpacing": true,
"arrowParens": "always"
"jsxBracketSameLine": true,
"tabWidth": 4
}
20 changes: 9 additions & 11 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
{
"[typescript]": {
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.codeActionsOnSave": {
"source.fixAll": "always"
}
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"files.associations": {
"*.css": "tailwindcss",
"*.scss": "tailwindcss"
},
"prettier.bracketSpacing": false
"editor.formatOnSave": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
]
}
8 changes: 4 additions & 4 deletions apps/nt-stylesheet/themes/colors.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ThemeConfig } from 'tailwindcss/types/config';
import { ThemeConfig } from 'tailwindcss/types/config'

export const colors: ThemeConfig['colors'] = {
black: '#000000',
Expand Down Expand Up @@ -141,7 +141,7 @@ export const colors: ThemeConfig['colors'] = {
white: '#FFFFFF',
diabled: '#C9CCD4',
},
};
}

export const boxShadow = {
primary: '0 0.125rem 0.25rem rgba(214, 0, 28, 0.15)',
Expand All @@ -150,12 +150,12 @@ export const boxShadow = {
warning: '0 0.25rem 0.375rem rgba(223, 119, 0, 0.15)',
danger: '0 0.25rem 0.375rem rgba(229, 16, 16, 0.15)',
neutral: '0 0.25rem 0.375rem rgba(0, 0, 0, 0.1)',
};
}

export const backgroundColor = {
dark: '#E6E6E6',
DEFAULT: '#F0F5FE',
light: '#F6F6F6',
white: '#FFFFFF',
disabled: '#C9CCD4',
};
}
30 changes: 12 additions & 18 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { FlatCompat } from '@eslint/eslintrc';
import nxEslintPlugin from '@nx/eslint-plugin';
import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin';
import typescriptParser from '@typescript-eslint/parser';
import prettierPlugin from 'eslint-plugin-prettier';
import { FlatCompat } from '@eslint/eslintrc'
import nxEslintPlugin from '@nx/eslint-plugin'
import typescriptEslintPlugin from '@typescript-eslint/eslint-plugin'
import typescriptParser from '@typescript-eslint/parser'
import prettierPlugin from 'eslint-plugin-prettier'

const compat = new FlatCompat({
baseConfig: {
Expand All @@ -11,11 +11,10 @@ const compat = new FlatCompat({
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@nx/recommended',
'prettier',
'plugin:prettier/recommended',
],
},
});
})

export default [
{
Expand All @@ -31,17 +30,12 @@ export default [
'@nx': nxEslintPlugin,
prettier: prettierPlugin,
},
ignores: ['apps/**/coverage/**', 'apps/**/dist/**', 'apps/**/.nx/**'],
ignores: [
'apps/**/coverage/**',
'apps/**/dist/**',
'apps/**/.nx/**',
],
rules: {
'prettier/prettier': [
'error',
{},
{
fileInfoOptions: {
withNodeModules: true,
},
},
],
'brace-style': ['error', '1tbs'],
'object-curly-spacing': ['error', 'always'],
'@nx/enforce-module-boundaries': [
Expand All @@ -66,4 +60,4 @@ export default [
},
],
}),
];
]

0 comments on commit 222018a

Please sign in to comment.