Skip to content

Commit

Permalink
chore: adds eslint-plugin-regexp to eslint config
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <[email protected]>
  • Loading branch information
pedrolamas committed Nov 14, 2024
1 parent 65c0e5f commit 444eb98
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 2 deletions.
2 changes: 2 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pluginVue from 'eslint-plugin-vue'
import * as pluginRegexp from 'eslint-plugin-regexp'
import neostandard from 'neostandard'
import vueTsEslintConfig from '@vue/eslint-config-typescript'

Expand All @@ -16,6 +17,7 @@ export default [
]
},
...pluginVue.configs['flat/vue2-recommended'],
pluginRegexp.configs['flat/recommended'],
...neostandard(),
...vueTsEslintConfig(),
{
Expand Down
79 changes: 79 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"@vue/test-utils": "^1.3.6",
"@vue/tsconfig": "~0.1.3",
"eslint": "^9.14.0",
"eslint-plugin-regexp": "^2.6.0",
"eslint-plugin-vue": "^9.31.0",
"husky": "^9.1.6",
"jsdom": "^25.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/widgets/filesystem/setupMonaco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ async function setupMonaco () {
lineContent = lineContent.trim()

if (lineContent.length > 0) {
const isComment = /^;|#(?!(region|endregion)\b)/.test(lineContent)
const isComment = /^;|#(?!(?:region|endregion)\b)/.test(lineContent)

if (isComment) {
if (state.current) {
Expand Down
2 changes: 1 addition & 1 deletion src/util/version-string-compare.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// https://github.com/coreutils/gnulib/blob/master/lib/filevercmp.h
// https://github.com/coreutils/gnulib/blob/master/lib/filevercmp.c

const extensionRegExp = /((?:\.[A-Za-z~][A-Za-z0-9~]*)*)$/
const extensionRegExp = /((?:\.[a-z~][a-z0-9~]*)*)$/i

const charCode_0 = 0x30
const charCode_9 = 0x39
Expand Down

0 comments on commit 444eb98

Please sign in to comment.