Skip to content

Commit

Permalink
Homework for lection 40 (simple React components developing) commit #1
Browse files Browse the repository at this point in the history
  • Loading branch information
my committed Sep 16, 2022
1 parent 420f376 commit 24e4ed0
Show file tree
Hide file tree
Showing 51 changed files with 48,959 additions and 7,050 deletions.
6 changes: 6 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/node_modules
/public
/dev
/cache
/storybook-static
/.storybook
16 changes: 14 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,29 @@
module.exports = {
parser: "@typescript-eslint/parser",
plugins: ["@typescript-eslint"],
env: {
browser: true,
es2021: true,
jest: true,
node: true,
},
extends: ["eslint:recommended", "prettier"],
extends: [
"plugin:jest/recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"eslint:recommended",
"prettier",
],
parserOptions: {
ecmaVersion: "latest",
sourceType: "module",
},
rules: {
indent: ["error", "tab"],
"@typescript-eslint/no-var-requires": 0,
"@typescript-eslint/no-unused-vars": 0,
"no-unused-vars": 0,
"no-undef": 0,
indent: 0,
"linebreak-style": ["error", "unix"],
quotes: ["error", "double"],
semi: ["error", "always"],
Expand Down
22 changes: 0 additions & 22 deletions .github/workflows/codesandbox-link-comment.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Coverage

on: pull_request

jobs:
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2
with:
node-version: 14
- uses: actions/checkout@v2
- uses: artiomtr/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
threshold: 60
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
node_modules
coverage
dev
public
dev
public
storybook-static
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/node_modules
/public
/dev
/cache
/storybook-static
/.storybook
12 changes: 12 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
module.exports = {
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
],
framework: "@storybook/react",
core: {
builder: "webpack5",
},
};
9 changes: 9 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
};
7 changes: 7 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": [
"stylelint-config-standard-scss",
"stylelint-config-standard",
"stylelint-config-prettier"
]
}
7 changes: 6 additions & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
module.exports = {
presets: [["@babel/preset-env", { targets: { node: "current" } }]],
presets: [
"@babel/preset-typescript",
["@babel/preset-env", { targets: { node: "current" } }],
["@babel/preset-react", { runtime: "automatic" }],
],
plugins: ["@babel/plugin-transform-runtime"],
};
12 changes: 6 additions & 6 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@ module.exports = {
// coverageProvider: "babel",

// A list of reporter names that Jest uses when writing coverage reports
// coverageReporters: [
// "json",
// "text",
// "lcov",
// "clover"
// ],
coverageReporters: ["json", "text", "lcov", "json-summary", "clover"],

// An object that configures minimum threshold enforcement for coverage results
// coverageThreshold: undefined,
Expand Down Expand Up @@ -99,6 +94,8 @@ module.exports = {
// An enum that specifies notification mode. Requires { notify: true }
// notifyMode: "failure-change",

preset: "ts-jest",

// A preset that is used as a base for Jest's configuration
// preset: undefined,

Expand Down Expand Up @@ -174,6 +171,9 @@ module.exports = {

// A map from regular expressions to paths to transformers
// transform: undefined,
transform: {
"^.+\\.[j|t]sx?$": "babel-jest",
},

// An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation
// transformIgnorePatterns: [
Expand Down
Loading

0 comments on commit 24e4ed0

Please sign in to comment.