Skip to content

Commit c65e346

Browse files
authored
Global variables config initialization (#23)
* fix configurations * fix generated .eslintcahce file in root folder facebook/create-react-app#10161 * Update code-style.yml
1 parent e9bb778 commit c65e346

File tree

8 files changed

+32990
-3860
lines changed

8 files changed

+32990
-3860
lines changed

.babelrc

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/workflows/code-style.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,12 @@ jobs:
1010
- uses: actions/setup-node@v3
1111
with:
1212
node-version: 16
13+
- name: set npm version
14+
run: npm install -g [email protected]
1315
- name: Install npm dependencies
1416
run: npm ci
1517
- name: Eslint
1618
run: npm run eslint:ci
1719
# - name: Stylelint
1820
# run: npm run lint:css
21+
# styelelint is not working correctly

.husky/lint-staged.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
"*.{js,jsx,ts,tsx}": ["eslint --cache --fix"],
2+
"*.{js,jsx,ts,tsx}": ["eslint --cache --fix --cache-location './node_modules/.cache/.eslintcache/'"],
33
"src/**/*.{js,jsx,ts,tsx}": () =>
44
"npx tsc --noEmit",
55
"*.{md,json,scss,css}": "prettier --write",

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

next.config.js

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
/* eslint-disable @typescript-eslint/no-var-requires */
33
const externallyEmbeddableIFrameResponseHeaders =
44
require("./src/shared-module/utils/responseHeaders").externallyEmbeddableIFrameResponseHeaders
5+
const svgoConfig = require("./src/shared-module/utils/svgoConfig")
56

67
const config = {
78
eslint: {
89
ignoreDuringBuilds: true,
910
},
10-
output: "standalone",
1111
async headers() {
1212
return [
1313
{
@@ -22,6 +22,32 @@ const config = {
2222
},
2323
]
2424
},
25+
output: "standalone",
26+
webpack(config) {
27+
config.module.rules.push({
28+
test: /\.svg$/i,
29+
issuer: /\.[jt]sx?$/,
30+
loader: "@svgr/webpack",
31+
options: {
32+
svgoConfig: svgoConfig,
33+
},
34+
})
35+
36+
return config
37+
},
38+
compiler: {
39+
emotion: {
40+
autoLabel: "always",
41+
labelFormat: "[dirname]--[filename]--[local]",
42+
},
43+
},
44+
experimental: {
45+
modularizeImports: {
46+
lodash: {
47+
transform: "lodash/{{member}}",
48+
},
49+
},
50+
},
2551
}
2652

2753
if (process.env.NEXT_PUBLIC_BASE_PATH) {

0 commit comments

Comments
 (0)