Skip to content

Commit

Permalink
#347 Upgrade to eslint v9 (#348)
Browse files Browse the repository at this point in the history
Breaking change
  • Loading branch information
wouter-adriaens authored Jan 9, 2025
1 parent 5c8a202 commit 5451d33
Show file tree
Hide file tree
Showing 8 changed files with 452 additions and 678 deletions.
3 changes: 0 additions & 3 deletions .eslintrc.json

This file was deleted.

3 changes: 3 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import eslintConfig from './public/eslint.config.js';

export default [...eslintConfig];
24 changes: 11 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
"import": "./dist/scss/main.scss",
"require": "./dist/scss/main.scss"
}
,
"./eslint": {
"import": "./dist/eslint.config.js",
"require": "./dist/eslint.config.js"
}
},
"repository": {
"type": "git",
Expand All @@ -40,7 +45,7 @@
"test:unit:dev": "cypress open --component",
"type-check": "vue-tsc --noEmit",
"type-generation": "vue-tsc --declaration --emitDeclarationOnly",
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
"lint": "eslint . --fix",
"format": "prettier --write src/",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
Expand Down Expand Up @@ -101,24 +106,17 @@
"@types/proj4": "^2.5.2",
"@types/tinymce": "^4.6.6",
"@types/uuid": "^9.0.3",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"@vitejs/plugin-vue": "^4.2.3",
"@vue/eslint-config-prettier": "^7.1.0",
"@vue/eslint-config-typescript": "^11.0.2",
"@vue/eslint-config-prettier": "^10.1.0",
"@vue/eslint-config-typescript": "^14.2.0",
"@vue/test-utils": "^2.3.2",
"@vue/tsconfig": "^0.7.0",
"chromatic": "^6.17.3",
"cypress": "^13.17.0",
"cypress-watch-and-reload": "^1.10.6",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.8.0",
"eslint-import-resolver-typescript": "^3.5.5",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-storybook": "^0.6.15",
"eslint-plugin-vue": "^9.11.0",
"eslint": "^9.17.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-vue": "^9.32.0",
"npm-run-all": "^4.1.5",
"path": "^0.12.7",
"prettier": "^2.8.4",
Expand Down
35 changes: 0 additions & 35 deletions public/.eslintrc.json

This file was deleted.

27 changes: 27 additions & 0 deletions public/eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting';
import vueTsEslintConfig from '@vue/eslint-config-typescript';
import pluginVue from 'eslint-plugin-vue';

export default [
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue}'],
},

{
name: 'app/files-to-ignore',
ignores: [
'**/dist/**',
'**/dist-ssr/**',
'**/coverage/**',
'**/static/**',
'**/storybook-static/**',
'**/cypress/**',
],
},

...pluginVue.configs['flat/recommended'],
...vueTsEslintConfig(),
// Skip formatting rules, these are handled by the format command that runs prettier
skipFormatting,
];
1 change: 0 additions & 1 deletion src/__tests__/OeZoneerder.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable vue/one-component-per-file */
import { defineComponent } from 'vue';
import { LayerType } from '@/models';
import { OeZoneerder } from '@components/smart';
Expand Down
22 changes: 12 additions & 10 deletions src/components/smart/OeAdres.vue
Original file line number Diff line number Diff line change
Expand Up @@ -523,17 +523,19 @@ onMounted(() => {
land.value = adres.land as ILand;
if (isBelgium.value) {
adres.gemeente && (gemeente.value = adres.gemeente as IGemeente);
adres.postcode && (postcode.value = { postcode: adres.postcode.nummer, uri: adres.postcode.uri } as IPostinfo);
adres.straat && (straat.value = adres.straat as IStraat);
adres.adres && (huisnummer.value = adres.adres as IAdres);
adres.adres && (busnummer.value = adres.adres as IAdres);
if (adres.gemeente) gemeente.value = adres.gemeente as IGemeente;
if (adres.postcode) postcode.value = { postcode: adres.postcode.nummer, uri: adres.postcode.uri } as IPostinfo;
if (adres.straat) straat.value = adres.straat as IStraat;
if (adres.adres) {
huisnummer.value = adres.adres as IAdres;
busnummer.value = adres.adres as IAdres;
}
} else {
gemeente.value = adres.gemeente?.naam;
postcode.value = adres.postcode?.nummer;
straat.value = adres.straat?.naam;
huisnummer.value = adres.adres?.huisnummer;
busnummer.value = adres.adres?.busnummer;
gemeente.value = adres.gemeente?.naam || '';
postcode.value = adres.postcode?.nummer || '';
straat.value = adres.straat?.naam || '';
huisnummer.value = adres.adres?.huisnummer || '';
busnummer.value = adres.adres?.busnummer || '';
}
}
});
Expand Down
Loading

0 comments on commit 5451d33

Please sign in to comment.