Skip to content

Commit

Permalink
Update lint and prettier rules
Browse files Browse the repository at this point in the history
  • Loading branch information
sudhons authored Nov 12, 2024
2 parents dd152ac + 8beea35 commit 85a6fdc
Show file tree
Hide file tree
Showing 15 changed files with 510 additions and 183 deletions.
80 changes: 35 additions & 45 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,40 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"standard",
"plugin:promise/recommended",
"plugin:jsx-a11y/recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended"
"collaborne",
"plugin:storybook/recommended"
],
"env": {
"node": true
},
"parserOptions": {
"ecmaVersion": 2020,
"ecmaFeatures": {
"legacyDecorators": true,
"jsx": true
"overrides": [
{
"files": [
"**/*.ts",
"**/*.tsx"
],
"extends": [
"standard",
"prettier",
"collaborne"
],
"env": {
"node": false
},
"plugins": [
"react",
"react-hooks",
"@typescript-eslint"
],
"rules": {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn"
}
},
{
"files": [
".storybook/**/*.ts",
".storybook/**/*.tsx"
],
"parserOptions": {
"project": "tsconfig.test.json"
}
}
},
"settings": {
"react": {
"version": "17"
}
},
"plugins": [
"import",
"jsx-a11y",
"react",
"react-hooks"
],
"rules": {
"space-before-function-paren": 0,
"react/prop-types": 0,
"react/jsx-handler-names": 0,
"react/jsx-fragments": 0,
"react/jsx-no-bind": "off",
"react/jsx-uses-react": "off",
"react/no-unused-prop-types": 0,
"react/react-in-jsx-scope": "off",
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
"import/export": 0,
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-empty-interface": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error"],
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"]
}
]
}
17 changes: 9 additions & 8 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"singleQuote": true,
"jsxSingleQuote": false,
"semi": true,
"tabWidth": 2,
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "avoid",
"trailingComma": "all"
"singleQuote": true,
"jsxSingleQuote": false,
"semi": true,
"tabWidth": 2,
"useTabs": true,
"bracketSpacing": true,
"jsxBracketSameLine": false,
"arrowParens": "avoid",
"trailingComma": "all"
}
6 changes: 3 additions & 3 deletions .storybook/stories/custom-column.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createElement, useCallback } from 'react';
import { action } from '@storybook/addon-actions';
import IconButton from '@mui/material/IconButton';
import CallToAction from '@mui/icons-material/CallToAction';
import IconButton from '@mui/material/IconButton';
import { action } from '@storybook/addon-actions';
import { createElement, useCallback } from 'react';

import { Board, Column } from '../../src';

Expand Down
2 changes: 1 addition & 1 deletion .storybook/stories/external-change.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useCallback, useState } from 'react';
import Button from '@mui/material/Button';
import { useCallback, useState } from 'react';

import { Board } from '../../src';

Expand Down
2 changes: 1 addition & 1 deletion .storybook/stories/generic-data.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useCallback, useState } from 'react';
import MaterialCard from '@mui/material/Card';
import CardContent from '@mui/material/CardContent';
import { useCallback, useState } from 'react';

import { Board, Card, Column } from '../../src';

Expand Down
1 change: 0 additions & 1 deletion .storybook/stories/utils/with-theme.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { createTheme, CssBaseline } from '@mui/material';
import { ThemeProvider } from '@mui/material/styles';
import { StoryFn } from '@storybook/react';

import type { StoryContext } from '@storybook/types';

const theme = createTheme({
Expand Down
Loading

0 comments on commit 85a6fdc

Please sign in to comment.