Skip to content

Commit

Permalink
Improve lint/clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
kilemensi committed Oct 14, 2024
1 parent 22b874a commit f837b02
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
7 changes: 7 additions & 0 deletions apps/climatemappedafrica/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
module.exports = {
root: true,
extends: ["eslint-config-commons-ui/next"],
settings: {
"import/resolver": {
webpack: {
config: "./eslint.webpack.config.js",
},
},
},
};
26 changes: 26 additions & 0 deletions apps/climatemappedafrica/eslint.webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const path = require("path");

module.exports = {
module: {
rules: [
{
test: /\.svg$/i,
type: "asset",
resourceQuery: /url/, // *.svg?url
},
{
test: /\.svg$/i,
issuer: /\.[jt]sx?$/,
resourceQuery: { not: [/url/] }, // exclude react component if *.svg?url
use: ["@svgr/webpack"],
},
],
},
resolve: {
alias: {
"@/climatemappedafrica": path.resolve(__dirname, "src/"),
content: path.resolve(__dirname, "content/"),
},
extensions: [".js"],
},
};
2 changes: 1 addition & 1 deletion apps/climatemappedafrica/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"lint": "TIMING=1 eslint --fix './'",
"jest": "jest",
"playwright": "npx playwright test",
"clean": "rm -rf .next .turbo node_modules"
"clean": "rm -rf .next .turbo build dist node_modules"
},
"dependencies": {
"@apollo/client": "catalog:",
Expand Down

0 comments on commit f837b02

Please sign in to comment.