Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

Commit

Permalink
prettify all
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeyRoyt committed Dec 27, 2023
1 parent 5363ff7 commit 551f4f7
Show file tree
Hide file tree
Showing 117 changed files with 609 additions and 609 deletions.
104 changes: 52 additions & 52 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
const commonRules = {
'react/display-name': 'off',
'object-curly-newline': 'off',
'no-debugger': 'error',
'global-require': 'off',
'no-unused-expressions': 'off',
'react/forbid-foreign-prop-types': 'off',
'no-console': 'off',
'consistent-return': 'off',
'no-use-before-define': 'off',
'one-var': 'off',
'default-case': 'off',
'func-names': 'off',
'react/sort-comp': 'off',
'class-methods-use-this': 'off',
radix: 'off',
'no-underscore-dangle': 'off',
'import/prefer-default-export': 'off',
'no-plusplus': 'off',
'react/react-in-jsx-scope': 0,
'react/no-danger': 'error',
'react/jsx-one-expression-per-line': 'off',
'react/prop-types': 0,
'react/forbid-prop-types': 'off',
'react/function-component-definition': 'off',
'default-param-last': 'off',
'react/require-default-props': ['error'],
'react/jsx-props-no-spreading': 0,
'react/jsx-filename-extension': ['error', { extensions: ['.js', '.jsx', '.ts', '.tsx'] }],
'react/default-props-match-prop-types': 'error',
'react/jsx-boolean-value': 'off',
'arrow-parens': 'off',
'implicit-arrow-linebreak': 'off',
'import/no-extraneous-dependencies': ['error', { devDependencies: true }],
"react/display-name": "off",
"object-curly-newline": "off",
"no-debugger": "error",
"global-require": "off",
"no-unused-expressions": "off",
"react/forbid-foreign-prop-types": "off",
"no-console": "off",
"consistent-return": "off",
"no-use-before-define": "off",
"one-var": "off",
"default-case": "off",
"func-names": "off",
"react/sort-comp": "off",
"class-methods-use-this": "off",
radix: "off",
"no-underscore-dangle": "off",
"import/prefer-default-export": "off",
"no-plusplus": "off",
"react/react-in-jsx-scope": 0,
"react/no-danger": "error",
"react/jsx-one-expression-per-line": "off",
"react/prop-types": 0,
"react/forbid-prop-types": "off",
"react/function-component-definition": "off",
"default-param-last": "off",
"react/require-default-props": ["error"],
"react/jsx-props-no-spreading": 0,
"react/jsx-filename-extension": ["error", { extensions: [".js", ".jsx", ".ts", ".tsx"] }],
"react/default-props-match-prop-types": "error",
"react/jsx-boolean-value": "off",
"arrow-parens": "off",
"implicit-arrow-linebreak": "off",
"import/no-extraneous-dependencies": ["error", { devDependencies: true }],
};
const commonPlugins = ['import', 'react', 'json', 'markdown', 'jest'];
const commonExtends = ['plugin:react/recommended', 'plugin:prettier/recommended', 'plugin:storybook/recommended'];
const commonPlugins = ["import", "react", "json", "markdown", "jest"];
const commonExtends = ["plugin:react/recommended", "plugin:prettier/recommended", "plugin:storybook/recommended"];

module.exports = {
overrides: [
{
files: ['*.jest.js', 'jest.setup.js', 'jest.init.js'],
files: ["*.jest.js", "jest.setup.js", "jest.init.js"],
env: {
jest: true,
'jest/globals': true,
"jest/globals": true,
},
},
{
files: ['.eslintrc.js', 'scripts/**/*.js', '__mocks__/**/*.js', 'rollup.config.js'],
files: [".eslintrc.js", "scripts/**/*.js", "__mocks__/**/*.js", "rollup.config.js"],
env: {
node: true,
},
},
{
files: ['*.ts', '*.tsx'],
parser: '@typescript-eslint/parser',
files: ["*.ts", "*.tsx"],
parser: "@typescript-eslint/parser",
extends: [
...commonExtends,
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
],
plugins: [...commonPlugins, '@typescript-eslint'],
plugins: [...commonPlugins, "@typescript-eslint"],
rules: {
...commonRules,
'@typescript-eslint/ban-ts-comment': ['warn'],
'no-unused-vars': 'off',
'react/require-default-props': 'off',
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }],
'@typescript-eslint/no-empty-function': 'off',
"@typescript-eslint/ban-ts-comment": ["warn"],
"no-unused-vars": "off",
"react/require-default-props": "off",
"@typescript-eslint/no-unused-vars": ["error", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }],
"@typescript-eslint/no-empty-function": "off",
},
},
],
Expand All @@ -79,20 +79,20 @@ module.exports = {
version: 27,
},
react: {
version: 'detect',
version: "detect",
},
},
extends: [...commonExtends, 'eslint:recommended'],
extends: [...commonExtends, "eslint:recommended"],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 13,
sourceType: 'module',
sourceType: "module",
},
plugins: [...commonPlugins],
rules: {
...commonRules,
'no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
"no-unused-vars": ["error", { argsIgnorePattern: "^_" }],
},
};
16 changes: 8 additions & 8 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import type { StorybookConfig } from '@storybook/react-webpack5';
import type { StorybookConfig } from "@storybook/react-webpack5";

const config: StorybookConfig = {
stories: ['../src/**/*.mdx', '../src/**/*.stories.tsx', '../storybook/**/*.stories.mdx'],
stories: ["../src/**/*.mdx", "../src/**/*.stories.tsx", "../storybook/**/*.stories.mdx"],
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',
'@storybook/addon-themes',
'@storybook/preset-scss',
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-themes",
"@storybook/preset-scss",
],
framework: {
name: '@storybook/react-webpack5',
name: "@storybook/react-webpack5",
options: {},
},
docs: {
autodocs: true,
},
staticDirs: ['../public'],
staticDirs: ["../public"],
};
export default config;
4 changes: 2 additions & 2 deletions .storybook/manager.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { addons } from '@storybook/manager-api';
import theme from './theme';
import { addons } from "@storybook/manager-api";
import theme from "./theme";

addons.setConfig({
theme: theme,
Expand Down
24 changes: 12 additions & 12 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Preview } from '@storybook/react';
import React from "react";
import { Preview } from "@storybook/react";
import {
AnchorListItem,
ComponentRules,
Expand All @@ -17,11 +17,11 @@ import {
UnstyledList,
UnstyledListItem,
UsageGuidelines,
} from '../src';
import { ComponentNameDecorator } from '../storybook/components';
import { DocsContainer, DocsPage, Unstyled } from '@storybook/blocks';
import { withThemeByClassName } from '@storybook/addon-themes';
import '../src/styles/tokens/index.scss';
} from "../src";
import { ComponentNameDecorator } from "../storybook/components";
import { DocsContainer, DocsPage, Unstyled } from "@storybook/blocks";
import { withThemeByClassName } from "@storybook/addon-themes";
import "../src/styles/tokens/index.scss";

const preview: Preview = {
parameters: {
Expand Down Expand Up @@ -62,18 +62,18 @@ const preview: Preview = {
},
options: {
storySort: {
order: ['Welcome', 'Change Log', '*'],
order: ["Welcome", "Change Log", "*"],
},
},
},
decorators: [
withThemeByClassName({
themes: {
Light: 'light-app-theme',
Dark: 'dark-app-theme',
Black: 'black-app-theme',
Light: "light-app-theme",
Dark: "dark-app-theme",
Black: "black-app-theme",
},
defaultTheme: 'Light',
defaultTheme: "Light",
}) as any,
],
};
Expand Down
16 changes: 8 additions & 8 deletions .storybook/theme.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { create } from '@storybook/theming/create';
import logo from './logo.png';
import { create } from "@storybook/theming/create";
import logo from "./logo.png";

export default create({
base: 'light',
base: "light",
brandImage: logo,
brandUrl: 'https://style.monday.com', // TODO set brand url
barSelectedColor: '#5034ff',
brandTitle: 'Vibe Storybook Components',
brandUrl: "https://style.monday.com", // TODO set brand url
barSelectedColor: "#5034ff",
brandTitle: "Vibe Storybook Components",
background: {
hoverable: 'rgba(80, 52, 255, 0.1)',
hoverable: "rgba(80, 52, 255, 0.1)",
},
hoverable: 'rgba(80, 52, 255, 0.1)',
hoverable: "rgba(80, 52, 255, 0.1)",
});
2 changes: 1 addition & 1 deletion __mocks__/fileMock.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const path = require('path');
const path = require("path");

module.exports = {
process(src, filename) {
Expand Down
2 changes: 1 addition & 1 deletion __mocks__/styleMock.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
process(src, filename) {
return { code: '' };
return { code: "" };
},
};
8 changes: 4 additions & 4 deletions eslint/resolver.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const path = require('path');
const { resolve: resolveExports } = require('resolve.exports');
const path = require("path");
const { resolve: resolveExports } = require("resolve.exports");

// optionally handle NodeJS built-ins just in case not handled by another ESLint module resolver in the chain
const { builtinModules } = require('module');
const { builtinModules } = require("module");
const builtins = new Set(builtinModules);

/**
Expand All @@ -24,7 +24,7 @@ const resolve = (source, file, _config) => {

return { found: true, path: moduleId };
} catch (/** @type {any} */ err) {
if (err.code === 'MODULE_NOT_FOUND' && err.path?.endsWith('/package.json')) {
if (err.code === "MODULE_NOT_FOUND" && err.path?.endsWith("/package.json")) {
const { name, module, main, exports } = require(err.path);
const resolved = resolveExports({ name, module, main, exports }, source);
const moduleId = path.join(path.dirname(err.path), resolved);
Expand Down
28 changes: 14 additions & 14 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ const rootDir = process.cwd();
module.exports = {
rootDir,
clearMocks: true,
coverageDirectory: 'coverage',
moduleFileExtensions: ['js', 'json', 'jsx', 'ts', 'tsx', 'node', 'mdx'],
coverageDirectory: "coverage",
moduleFileExtensions: ["js", "json", "jsx", "ts", "tsx", "node", "mdx"],
moduleNameMapper: {
'\\.module\\.scss$': 'identity-obj-proxy',
'^lodash-es(.*)': '<rootDir>/node_modules/lodash$1',
'\\.(css|less|sass|scss)$': '<rootDir>/__mocks__/styleMock.js',
"\\.module\\.scss$": "identity-obj-proxy",
"^lodash-es(.*)": "<rootDir>/node_modules/lodash$1",
"\\.(css|less|sass|scss)$": "<rootDir>/__mocks__/styleMock.js",
},
modulePathIgnorePatterns: ['<rootDir>/dist', '<rootDir>/build'],
preset: 'ts-jest/presets/default',
testEnvironment: 'jsdom',
testMatch: ['**/__tests__/**/*.jest.[jt]s?(x)'],
transformIgnorePatterns: ['/node_modules/(?!monday-ui-react-core)'],
modulePathIgnorePatterns: ["<rootDir>/dist", "<rootDir>/build"],
preset: "ts-jest/presets/default",
testEnvironment: "jsdom",
testMatch: ["**/__tests__/**/*.jest.[jt]s?(x)"],
transformIgnorePatterns: ["/node_modules/(?!monday-ui-react-core)"],
transform: {
'^.+\\.jsx?$': 'babel-jest',
'^.+\\.(tx|tsx)$': 'ts-jest',
'\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|svg)$':
'<rootDir>/__mocks__/fileMock.js',
"^.+\\.jsx?$": "babel-jest",
"^.+\\.(tx|tsx)$": "ts-jest",
"\\.(jpg|ico|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|svg)$":
"<rootDir>/__mocks__/fileMock.js",
},
};
Loading

0 comments on commit 551f4f7

Please sign in to comment.