Skip to content

Commit

Permalink
Global variables config initialization (#23)
Browse files Browse the repository at this point in the history
* fix configurations

* fix generated .eslintcahce file in root folder facebook/create-react-app#10161

* Update code-style.yml
  • Loading branch information
anadis504 authored Oct 15, 2022
1 parent e9bb778 commit c65e346
Show file tree
Hide file tree
Showing 8 changed files with 32,990 additions and 3,860 deletions.
33 changes: 0 additions & 33 deletions .babelrc

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,12 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 16
- name: set npm version
run: npm install -g npm@8.3.1
- name: Install npm dependencies
run: npm ci
- name: Eslint
run: npm run eslint:ci
# - name: Stylelint
# run: npm run lint:css
# styelelint is not working correctly
2 changes: 1 addition & 1 deletion .husky/lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
"*.{js,jsx,ts,tsx}": ["eslint --cache --fix"],
"*.{js,jsx,ts,tsx}": ["eslint --cache --fix --cache-location './node_modules/.cache/.eslintcache/'"],
"src/**/*.{js,jsx,ts,tsx}": () =>
"npx tsc --noEmit",
"*.{md,json,scss,css}": "prettier --write",
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
engine-strict=true
28 changes: 27 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const externallyEmbeddableIFrameResponseHeaders =
require("./src/shared-module/utils/responseHeaders").externallyEmbeddableIFrameResponseHeaders
const svgoConfig = require("./src/shared-module/utils/svgoConfig")

const config = {
eslint: {
ignoreDuringBuilds: true,
},
output: "standalone",
async headers() {
return [
{
Expand All @@ -22,6 +22,32 @@ const config = {
},
]
},
output: "standalone",
webpack(config) {
config.module.rules.push({
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
loader: "@svgr/webpack",
options: {
svgoConfig: svgoConfig,
},
})

return config
},
compiler: {
emotion: {
autoLabel: "always",
labelFormat: "[dirname]--[filename]--[local]",
},
},
experimental: {
modularizeImports: {
lodash: {
transform: "lodash/{{member}}",
},
},
},
}

if (process.env.NEXT_PUBLIC_BASE_PATH) {
Expand Down
Loading

0 comments on commit c65e346

Please sign in to comment.