]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0460: filetype: lintstagedrc files are not recognized v9.1.0460
authorİlyas Akın <ilyas.akin@kuika.com>
Sun, 2 Jun 2024 14:57:00 +0000 (16:57 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 2 Jun 2024 14:57:00 +0000 (16:57 +0200)
Problem:  filetype: lintstagedrc files are not recognized
Solution: recognize '.lintstagedrc' files as json filetype
          (İlyas Akın)

see: https://github.com/lint-staged/lint-staged

closes: #14897

Signed-off-by: İlyas Akın <ilyas.akin@kuika.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 27879d4976f7d76a2aa52089014aa319dbb785d9..801a8f346d28db24b644f773f2f67542ad6df466 100644 (file)
@@ -1177,7 +1177,7 @@ au BufNewFile,BufRead *.ipynb,*.jupyterlab-settings       setf json
 au BufNewFile,BufRead *.sublime-project,*.sublime-settings,*.sublime-workspace setf json
 
 " Other files that look like json
-au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,flake.lock  setf json
+au BufNewFile,BufRead .prettierrc,.firebaserc,.stylelintrc,.lintstagedrc,flake.lock    setf json
 
 " JSONC (JSON with comments)
 au BufNewFile,BufRead *.jsonc,.babelrc,.eslintrc,.jsfmtrc      setf jsonc
index 322c873ee308f11d9451f2f119aeeead2fcb4f89..284a55fe6a37a3333712adae38f26aa727c9d5b0 100644 (file)
@@ -364,7 +364,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     jq: ['file.jq'],
     jovial: ['file.jov', 'file.j73', 'file.jovial'],
     jproperties: ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'],
-    json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', '.prettierrc', '.firebaserc', '.stylelintrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace', 'file.bd', 'file.bda', 'file.xci', 'flake.lock'],
+    json: ['file.json', 'file.jsonp', 'file.json-patch', 'file.geojson', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', 'file.jupyterlab-settings', '.prettierrc', '.firebaserc', '.stylelintrc', '.lintstagedrc', 'file.slnf', 'file.sublime-project', 'file.sublime-settings', 'file.sublime-workspace', 'file.bd', 'file.bda', 'file.xci', 'flake.lock'],
     json5: ['file.json5'],
     jsonc: ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.jscsrc', '.vsconfig', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json', '.luaurc'],
     jsonl: ['file.jsonl'],
index 8b1282bd40482dde5d88147b311efc07384f9fa9..f8951af065cafdf0765fd85f15c745c552ee865a 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    460,
 /**/
     459,
 /**/