@rhyster/eslint-config 1.4.13 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -2,8 +2,10 @@ import js from '@eslint/js';
2
2
  import stylistic from '@stylistic/eslint-plugin';
3
3
  import importx from 'eslint-plugin-import-x';
4
4
  import nodePlugin from 'eslint-plugin-n';
5
+ import vuePlugin from 'eslint-plugin-vue';
5
6
  import globals from 'globals';
6
7
  import ts from 'typescript-eslint';
8
+ import vueParser from 'vue-eslint-parser';
7
9
  import confusingBrowserGlobals from 'confusing-browser-globals';
8
10
 
9
11
  const bestPractices = {
@@ -1865,6 +1867,53 @@ const general = {
1865
1867
  ]
1866
1868
  }
1867
1869
  };
1870
+ const browserRules = {
1871
+ name: "@rhyster/eslint-config/airbnb/browser",
1872
+ languageOptions: {
1873
+ globals: globals.browser
1874
+ }
1875
+ };
1876
+ const generalVue = {
1877
+ ...general,
1878
+ name: "@rhyster/eslint-config/airbnb/general-vue",
1879
+ plugins: {
1880
+ ...general.plugins,
1881
+ vue: vuePlugin
1882
+ },
1883
+ settings: {
1884
+ ...general.settings,
1885
+ "import-x/parsers": {
1886
+ ...general.settings["import-x/parsers"],
1887
+ "vue-eslint-parser": [
1888
+ ".vue"
1889
+ ]
1890
+ },
1891
+ "import-x/resolver": {
1892
+ node: {
1893
+ extensions: [
1894
+ ...general.settings["import-x/resolver"].node.extensions,
1895
+ ".vue"
1896
+ ]
1897
+ }
1898
+ },
1899
+ "import-x/extensions": [
1900
+ ...general.settings["import-x/extensions"],
1901
+ ".vue"
1902
+ ]
1903
+ }
1904
+ };
1905
+ const setupVue = {
1906
+ name: "@rhyster/eslint-config/setup-vue",
1907
+ files: ["**/*.vue"],
1908
+ languageOptions: {
1909
+ parser: vueParser,
1910
+ parserOptions: {
1911
+ projectService: true,
1912
+ parser: ts.parser,
1913
+ extraFileExtensions: [".vue"]
1914
+ }
1915
+ }
1916
+ };
1868
1917
  const core = [
1869
1918
  js.configs.recommended,
1870
1919
  {
@@ -1897,12 +1946,49 @@ const node = [
1897
1946
  ];
1898
1947
  const browser = [
1899
1948
  ...core,
1949
+ browserRules
1950
+ ];
1951
+ const vue = [
1952
+ js.configs.recommended,
1900
1953
  {
1901
- languageOptions: {
1902
- globals: globals.browser
1954
+ name: "@rhyster/eslint-config/files-ts",
1955
+ files: ["**/*.ts"]
1956
+ },
1957
+ {
1958
+ name: "@rhyster/eslint-config/files-vue",
1959
+ files: ["**/*.vue"]
1960
+ },
1961
+ generalVue,
1962
+ ...ts.configs.strictTypeChecked.map((config) => {
1963
+ if (config.files?.includes("**/*.ts") === true) {
1964
+ return {
1965
+ ...config,
1966
+ files: [...config.files, "**/*.vue"]
1967
+ };
1903
1968
  }
1904
- }
1969
+ return config;
1970
+ }),
1971
+ ...ts.configs.stylisticTypeChecked.map((config) => {
1972
+ if (config.files?.includes("**/*.ts") === true) {
1973
+ return {
1974
+ ...config,
1975
+ files: [...config.files, "**/*.vue"]
1976
+ };
1977
+ }
1978
+ return config;
1979
+ }),
1980
+ bestPractices,
1981
+ errors,
1982
+ style,
1983
+ variables,
1984
+ es6,
1985
+ imports,
1986
+ strict,
1987
+ typescript,
1988
+ browserRules,
1989
+ ...vuePlugin.configs["flat/recommended"],
1990
+ setupVue
1905
1991
  ];
1906
1992
 
1907
- export { browser, core, node };
1993
+ export { browser, core, node, vue };
1908
1994
  //# sourceMappingURL=index.mjs.map