🔨(project) add json, cjs and js extensions to prettier config
Prettier had some missing extensions in the config, this commit added them, we then prettified the whole project. We ignore the `cunningham-tokens` files.
This commit is contained in:
committed by
Jean-Baptiste PENRATH
parent
b46aaa66ed
commit
6ea8544fed
@@ -29,7 +29,10 @@
|
||||
"plugins": ["formatjs", "@typescript-eslint", "import"],
|
||||
/* Disable some rules to be iso with tslint which was previously used */
|
||||
"rules": {
|
||||
"@typescript-eslint/explicit-member-accessibility": ["error", { "accessibility": "no-public" }],
|
||||
"@typescript-eslint/explicit-member-accessibility": [
|
||||
"error",
|
||||
{ "accessibility": "no-public" }
|
||||
],
|
||||
"@typescript-eslint/lines-between-class-members": "off",
|
||||
"@typescript-eslint/no-use-before-define": "off",
|
||||
"arrow-parens": "error",
|
||||
@@ -45,7 +48,14 @@
|
||||
"import/order": [
|
||||
"error",
|
||||
{
|
||||
"groups": ["builtin", "external", "internal", "parent", "sibling", "index"],
|
||||
"groups": [
|
||||
"builtin",
|
||||
"external",
|
||||
"internal",
|
||||
"parent",
|
||||
"sibling",
|
||||
"index"
|
||||
],
|
||||
"alphabetize": { "order": "ignore" }
|
||||
}
|
||||
],
|
||||
@@ -70,7 +80,10 @@
|
||||
"react/destructuring-assignment": "off",
|
||||
"react/function-component-definition": [
|
||||
"error",
|
||||
{ "namedComponents": "arrow-function", "unnamedComponents": "arrow-function" }
|
||||
{
|
||||
"namedComponents": "arrow-function",
|
||||
"unnamedComponents": "arrow-function"
|
||||
}
|
||||
],
|
||||
"react/jsx-boolean-value": "off",
|
||||
"react/jsx-fragments": "off",
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
import { addons } from '@storybook/manager-api';
|
||||
import { create } from '@storybook/theming';
|
||||
import { defaultTokens } from '@openfun/cunningham-tokens';
|
||||
import { addons } from "@storybook/manager-api";
|
||||
import { create } from "@storybook/theming";
|
||||
import { defaultTokens } from "@openfun/cunningham-tokens";
|
||||
|
||||
const COLORS = defaultTokens.theme.colors;
|
||||
|
||||
const theme = create({
|
||||
base: 'light',
|
||||
brandUrl: 'https://github.com/openfun/cunningham',
|
||||
brandImage: 'logo-cunningham.svg',
|
||||
brandTitle: 'Cunningham',
|
||||
brandTarget: '_self',
|
||||
|
||||
base: "light",
|
||||
brandUrl: "https://github.com/openfun/cunningham",
|
||||
brandImage: "logo-cunningham.svg",
|
||||
brandTitle: "Cunningham",
|
||||
brandTarget: "_self",
|
||||
|
||||
//
|
||||
colorPrimary: COLORS["primary-400"],
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
"empty": "This table is empty",
|
||||
"empty_alt": "Illustration of an empty table",
|
||||
"loader_aria": "Loading data",
|
||||
"rows_selection_aria":"All rows selection",
|
||||
"rows_selection_aria": "All rows selection",
|
||||
"row_selection_aria": "Row selection"
|
||||
},
|
||||
"provider": {
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"exclude": [],
|
||||
"include": [
|
||||
"**/*.ts",
|
||||
"**/*.tsx",
|
||||
".eslintrc.cjs"
|
||||
]
|
||||
}
|
||||
"include": ["**/*.ts", "**/*.tsx", ".eslintrc.cjs"]
|
||||
}
|
||||
|
||||
@@ -8,6 +8,6 @@
|
||||
"types": ["vitest/globals", "vite/client"]
|
||||
},
|
||||
"include": ["src", "cunningham.ts"],
|
||||
"exclude": ["node_modules","dist", "**/tokens.ts", "**/*.stories.tsx"],
|
||||
"exclude": ["node_modules", "dist", "**/tokens.ts", "**/*.stories.tsx"],
|
||||
"references": [{ "path": "./tsconfig.node.json" }]
|
||||
}
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"exclude": [
|
||||
"./__mocks__",
|
||||
"./tests",
|
||||
"**/*.spec.ts",
|
||||
]
|
||||
"exclude": ["./__mocks__", "./tests", "**/*.spec.ts"]
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
{
|
||||
"extends": "@openfun/typescript-configs/node.json",
|
||||
"include": [
|
||||
"**/*"
|
||||
],
|
||||
"include": ["**/*"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
@@ -10,5 +8,5 @@
|
||||
},
|
||||
"resolveJsonModule": true,
|
||||
"outDir": "../../dist/bin"
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
{
|
||||
"extends": "@openfun/typescript-configs/node.json",
|
||||
"include": [
|
||||
"./*"
|
||||
],
|
||||
"include": ["./*"],
|
||||
"compilerOptions": {
|
||||
"baseUrl": "./",
|
||||
"outDir": "../../dist/lib",
|
||||
|
||||
@@ -1,7 +1,3 @@
|
||||
{
|
||||
"include": [
|
||||
"**/*.ts",
|
||||
"**/*.js",
|
||||
".eslintrc.cjs"
|
||||
]
|
||||
}
|
||||
"include": ["**/*.ts", "**/*.js", ".eslintrc.cjs"]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
{
|
||||
"include": [
|
||||
"./jest.config.ts"
|
||||
]
|
||||
"include": ["./jest.config.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user