Skip to content

Commit

Permalink
chore: brought in @codecademy/eslint-config for ESLint 8
Browse files Browse the repository at this point in the history
Brings in Codecademy/client-modules#4 for a refreshed linting config.
  • Loading branch information
Josh Goldberg authored Nov 30, 2021
1 parent a3d6559 commit 17a0ee5
Show file tree
Hide file tree
Showing 7 changed files with 356 additions and 349 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ module.exports = {
// These rules could be useful, but we haven't gotten around to enabling them here
// See WEB-2 for general tracking.
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-unsafe-argument': 'off',
'@typescript-eslint/no-unsafe-call': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-unsafe-assignment': 'off',
Expand Down
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"eslint.options": {
"configFile": "./.eslintrc.js",
"extensions": [".js", ".jsx", ".md", ".mdx", ".ts", ".tsx"]
},
"eslint.probe": [
Expand Down
20 changes: 7 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@babel/cli": "7.13.10",
"@babel/core": "7.13.10",
"@babel/preset-typescript": "^7.13.0",
"@codecademy/eslint-config": "^5.4.0",
"@codecademy/eslint-config": "7.0.0",
"@codecademy/prettier-config": "^0.1.10",
"@codecademy/tsconfig": "^0.2.0",
"@emotion/babel-plugin": "^11.3.0",
Expand All @@ -81,8 +81,8 @@
"@types/react": "^16.9",
"@types/react-dom": "^16.9",
"@types/stylis": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^4.30.0",
"@typescript-eslint/parser": "^4.30.0",
"@typescript-eslint/eslint-plugin": "^5.3.0",
"@typescript-eslint/parser": "^5.3.0",
"babel-jest": "26.6.3",
"babel-plugin-macros": "3.0.1",
"babel-preset-codecademy": "2.3.0",
Expand All @@ -91,17 +91,8 @@
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.5",
"enzyme-to-json": "3.3.5",
"eslint": "^7.19.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-jest": "^24.4.0",
"eslint-plugin-jest-react": "^0.0.2",
"eslint-plugin-jsx-a11y": "^6.4.1",
"eslint": "^8.2.0",
"eslint-plugin-local-rules": "^1.1.0",
"eslint-plugin-no-only-tests": "^2.6.0",
"eslint-plugin-react": "^7.25.1",
"eslint-plugin-react-hooks": "^4.2.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"eslint-plugin-unused-imports": "^1.1.4",
"husky": "4.2.5",
"identity-obj-proxy": "3.0.0",
"jest": "^26.6.3",
Expand All @@ -117,6 +108,9 @@
"react-test-renderer": "16.13.1",
"typescript": "4.4.2"
},
"resolutions": {
"@typescript-eslint/experimental-utils": "5.3.1"
},
"husky": {
"skipCI": false,
"hooks": {
Expand Down
8 changes: 1 addition & 7 deletions packages/gamut/src/Spinner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,8 @@ export type SpinnerProps = SVGProps<SVGSVGElement> & {
size?: number | string;
};

const defaultProps: SpinnerProps = {
size: 24,
};

export const Spinner: FunctionComponent<SpinnerProps> = ({
size,
size = 24,
...props
}) => {
return (
Expand Down Expand Up @@ -151,5 +147,3 @@ export const Spinner: FunctionComponent<SpinnerProps> = ({
</svg>
);
};

Spinner.defaultProps = defaultProps;
11 changes: 3 additions & 8 deletions packages/gamut/src/Tabs/TabList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ export type TabListProps = {
onChange?: () => void;
};

const defaultProps = {
createBaseId: (i: number) => `${i}`,
activeTabIndex: 0,
};
const defaultCreateBaseId = (i: number) => `${i}`;

/**
* @deprecated
Expand All @@ -27,11 +24,11 @@ const defaultProps = {
*/

export const TabList: FunctionComponent<TabListProps> = ({
activeTabIndex,
activeTabIndex = 0,
center,
children,
className,
createBaseId,
createBaseId = defaultCreateBaseId,
maxWidth,
onChange,
}) => {
Expand All @@ -53,5 +50,3 @@ export const TabList: FunctionComponent<TabListProps> = ({
</div>
);
};

TabList.defaultProps = defaultProps;
4 changes: 2 additions & 2 deletions typings/css.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
declare module '*.css' {
const styles: { [i: string]: any };
const styles: { [i: string]: string };
export default styles;
}

declare module '*.scss' {
const styles: { [i: string]: any };
const styles: { [i: string]: string };
export default styles;
}
Loading

0 comments on commit 17a0ee5

Please sign in to comment.