Skip to content

Commit

Permalink
fix: eslint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
fluid-design-io committed Dec 24, 2022
1 parent 0dfa13a commit 9dc0d6b
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 7 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
'warn',
{ props: 'never', children: 'never' },
],

"@typescript-eslint/ban-ts-comment": "off",
//#region //*=========== Import Sort ===========
'simple-import-sort/exports': 'warn',
'simple-import-sort/imports': [
Expand Down Expand Up @@ -67,5 +67,6 @@ module.exports = {
React: true,
JSX: true,
},
ignorePatterns: ["ThemeContext.tsx", "./src/lib/useScrolled.tsx", "./**/Search.tsx"],
ignorePatterns: ["ThemeContext.tsx", "useScrolled.tsx", "./**/Search.tsx"],

};
31 changes: 30 additions & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,36 @@ module.exports = {
jsxSingleQuote: true,
tabWidth: 2,
semi: true,
importOrder: ["^@/(.*)$", "^~/(.*)$", "^[./]"],
importOrder: [
// ext library & side effect imports
['^@?\\w', '^\\u0000'],
// {s}css files
['^.+\\.s?css$'],
// Lib and hooks
['^@/lib', '^@/hooks'],
// static data
['^@/data'],
// components
['^@/components', '^@/container'],
// zustand store
['^@/store'],
// Other imports
['^@/'],
// relative paths up until 3 level
[
'^\\./?$',
'^\\.(?!/?$)',
'^\\.\\./?$',
'^\\.\\.(?!/?$)',
'^\\.\\./\\.\\./?$',
'^\\.\\./\\.\\.(?!/?$)',
'^\\.\\./\\.\\./\\.\\./?$',
'^\\.\\./\\.\\./\\.\\.(?!/?$)',
],
['^@/types'],
// other that didnt fit in
['^'],
],
importOrderSeparation: true,
importOrderSortSpecifiers: true
};
1 change: 1 addition & 0 deletions src/components/form/SelectExamples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ const CustomSelect = ({ className = '' }) => {
label="What's on the menu?"
placeholder='Select as many as you like'
multiple
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
/* @ts-ignore */
selectedItemsClassName='flex flex-wrap p-2 gap-2'
rednerOptionItem={({ item, Option }) => (
Expand Down
4 changes: 3 additions & 1 deletion src/components/framework/Search.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/ban-ts-comment */
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-nocheck
import { createAutocomplete } from '@algolia/autocomplete-core';
import { getAlgoliaResults } from '@algolia/autocomplete-preset-algolia';
Expand All @@ -6,8 +8,8 @@ import algoliasearch from 'algoliasearch/lite';
import clsx from 'clsx';
import { useRouter } from 'next/router';
import {
Fragment,
forwardRef,
Fragment,
useEffect,
useId,
useRef,
Expand Down
11 changes: 8 additions & 3 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"target": "ES5",
"jsx": "preserve",
"target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
Expand All @@ -13,12 +14,16 @@
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"~/*": ["./public/*"]
}
},
"plugins": [
{
"name": "next"
}
]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "**/*.mdx"],
"exclude": ["node_modules"],
Expand Down

1 comment on commit 9dc0d6b

@vercel
Copy link

@vercel vercel bot commented on 9dc0d6b Dec 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.