ci(web): add eslint alias linter (#4440)
This linter utilises alias/path configuration specified in the `tsconfig.json` for imports, this allows us to enforce consistency within the frontend codebase.pull/4441/head
parent
01422b0f43
commit
4cfa3cf5a6
|
@ -9,8 +9,10 @@ module.exports = {
|
||||||
typescript: {},
|
typescript: {},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
plugins: ["@limegrass/import-alias"],
|
||||||
extends: ["react-app", "plugin:import/errors", "plugin:import/warnings", "plugin:prettier/recommended", "prettier"],
|
extends: ["react-app", "plugin:import/errors", "plugin:import/warnings", "plugin:prettier/recommended", "prettier"],
|
||||||
rules: {
|
rules: {
|
||||||
|
"@limegrass/import-alias/import-alias": "error",
|
||||||
"import/order": [
|
"import/order": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
|
|
|
@ -145,6 +145,7 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "17.3.0",
|
"@commitlint/cli": "17.3.0",
|
||||||
"@commitlint/config-conventional": "17.3.0",
|
"@commitlint/config-conventional": "17.3.0",
|
||||||
|
"@limegrass/eslint-plugin-import-alias": "1.0.6",
|
||||||
"@testing-library/jest-dom": "5.16.5",
|
"@testing-library/jest-dom": "5.16.5",
|
||||||
"@testing-library/react": "13.4.0",
|
"@testing-library/react": "13.4.0",
|
||||||
"@types/jest": "29.2.3",
|
"@types/jest": "29.2.3",
|
||||||
|
|
|
@ -10,6 +10,7 @@ specifiers:
|
||||||
'@fortawesome/free-regular-svg-icons': 6.2.1
|
'@fortawesome/free-regular-svg-icons': 6.2.1
|
||||||
'@fortawesome/free-solid-svg-icons': 6.2.1
|
'@fortawesome/free-solid-svg-icons': 6.2.1
|
||||||
'@fortawesome/react-fontawesome': 0.2.0
|
'@fortawesome/react-fontawesome': 0.2.0
|
||||||
|
'@limegrass/eslint-plugin-import-alias': 1.0.6
|
||||||
'@mui/icons-material': 5.10.15
|
'@mui/icons-material': 5.10.15
|
||||||
'@mui/material': 5.10.15
|
'@mui/material': 5.10.15
|
||||||
'@mui/styles': 5.10.15
|
'@mui/styles': 5.10.15
|
||||||
|
@ -95,6 +96,7 @@ dependencies:
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@commitlint/cli': 17.3.0
|
'@commitlint/cli': 17.3.0
|
||||||
'@commitlint/config-conventional': 17.3.0
|
'@commitlint/config-conventional': 17.3.0
|
||||||
|
'@limegrass/eslint-plugin-import-alias': 1.0.6_eslint@8.28.0
|
||||||
'@testing-library/jest-dom': 5.16.5
|
'@testing-library/jest-dom': 5.16.5
|
||||||
'@testing-library/react': 13.4.0_biqbaboplfbrettd7655fr4n2y
|
'@testing-library/react': 13.4.0_biqbaboplfbrettd7655fr4n2y
|
||||||
'@types/jest': 29.2.3
|
'@types/jest': 29.2.3
|
||||||
|
@ -2853,6 +2855,19 @@ packages:
|
||||||
'@jridgewell/sourcemap-codec': 1.4.14
|
'@jridgewell/sourcemap-codec': 1.4.14
|
||||||
dev: true
|
dev: true
|
||||||
|
|
||||||
|
/@limegrass/eslint-plugin-import-alias/1.0.6_eslint@8.28.0:
|
||||||
|
resolution: {integrity: sha512-BtPmdHbL4NmkVh2wMnOboyOCrdLOpBqwwtBIsB0/giTiALw/UTHD9TyH4vVnbDOuWPZQgE6kKloJ9G77FApt7w==}
|
||||||
|
peerDependencies:
|
||||||
|
eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8
|
||||||
|
dependencies:
|
||||||
|
eslint: 8.28.0
|
||||||
|
find-up: 5.0.0
|
||||||
|
fs-extra: 10.1.0
|
||||||
|
micromatch: 4.0.5
|
||||||
|
slash: 3.0.0
|
||||||
|
tsconfig-paths: 3.14.1
|
||||||
|
dev: true
|
||||||
|
|
||||||
/@mui/base/5.0.0-alpha.107_2zx2umvpluuhvlq44va5bta2da:
|
/@mui/base/5.0.0-alpha.107_2zx2umvpluuhvlq44va5bta2da:
|
||||||
resolution: {integrity: sha512-HX/BD8CSe+Y/dpbZ5aKJScJhKQ/Hw6du2yd68Upv2cO67bwixyZ64h3aNcdDu7RQzI7nrZQm0JykffP1Orgq0g==}
|
resolution: {integrity: sha512-HX/BD8CSe+Y/dpbZ5aKJScJhKQ/Hw6du2yd68Upv2cO67bwixyZ64h3aNcdDu7RQzI7nrZQm0JykffP1Orgq0g==}
|
||||||
engines: {node: '>=12.0.0'}
|
engines: {node: '>=12.0.0'}
|
||||||
|
|
Loading…
Reference in New Issue