@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.cjs CHANGED
@@ -4,8 +4,10 @@ const js = require('@eslint/js');
4
4
  const stylistic = require('@stylistic/eslint-plugin');
5
5
  const importx = require('eslint-plugin-import-x');
6
6
  const nodePlugin = require('eslint-plugin-n');
7
+ const vuePlugin = require('eslint-plugin-vue');
7
8
  const globals = require('globals');
8
9
  const ts = require('typescript-eslint');
10
+ const vueParser = require('vue-eslint-parser');
9
11
  const confusingBrowserGlobals = require('confusing-browser-globals');
10
12
 
11
13
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
@@ -14,8 +16,10 @@ const js__default = /*#__PURE__*/_interopDefaultCompat(js);
14
16
  const stylistic__default = /*#__PURE__*/_interopDefaultCompat(stylistic);
15
17
  const importx__default = /*#__PURE__*/_interopDefaultCompat(importx);
16
18
  const nodePlugin__default = /*#__PURE__*/_interopDefaultCompat(nodePlugin);
19
+ const vuePlugin__default = /*#__PURE__*/_interopDefaultCompat(vuePlugin);
17
20
  const globals__default = /*#__PURE__*/_interopDefaultCompat(globals);
18
21
  const ts__default = /*#__PURE__*/_interopDefaultCompat(ts);
22
+ const vueParser__default = /*#__PURE__*/_interopDefaultCompat(vueParser);
19
23
  const confusingBrowserGlobals__default = /*#__PURE__*/_interopDefaultCompat(confusingBrowserGlobals);
20
24
 
21
25
  const bestPractices = {
@@ -1877,6 +1881,53 @@ const general = {
1877
1881
  ]
1878
1882
  }
1879
1883
  };
1884
+ const browserRules = {
1885
+ name: "@rhyster/eslint-config/airbnb/browser",
1886
+ languageOptions: {
1887
+ globals: globals__default.browser
1888
+ }
1889
+ };
1890
+ const generalVue = {
1891
+ ...general,
1892
+ name: "@rhyster/eslint-config/airbnb/general-vue",
1893
+ plugins: {
1894
+ ...general.plugins,
1895
+ vue: vuePlugin__default
1896
+ },
1897
+ settings: {
1898
+ ...general.settings,
1899
+ "import-x/parsers": {
1900
+ ...general.settings["import-x/parsers"],
1901
+ "vue-eslint-parser": [
1902
+ ".vue"
1903
+ ]
1904
+ },
1905
+ "import-x/resolver": {
1906
+ node: {
1907
+ extensions: [
1908
+ ...general.settings["import-x/resolver"].node.extensions,
1909
+ ".vue"
1910
+ ]
1911
+ }
1912
+ },
1913
+ "import-x/extensions": [
1914
+ ...general.settings["import-x/extensions"],
1915
+ ".vue"
1916
+ ]
1917
+ }
1918
+ };
1919
+ const setupVue = {
1920
+ name: "@rhyster/eslint-config/setup-vue",
1921
+ files: ["**/*.vue"],
1922
+ languageOptions: {
1923
+ parser: vueParser__default,
1924
+ parserOptions: {
1925
+ projectService: true,
1926
+ parser: ts__default.parser,
1927
+ extraFileExtensions: [".vue"]
1928
+ }
1929
+ }
1930
+ };
1880
1931
  const core = [
1881
1932
  js__default.configs.recommended,
1882
1933
  {
@@ -1909,14 +1960,52 @@ const node = [
1909
1960
  ];
1910
1961
  const browser = [
1911
1962
  ...core,
1963
+ browserRules
1964
+ ];
1965
+ const vue = [
1966
+ js__default.configs.recommended,
1912
1967
  {
1913
- languageOptions: {
1914
- globals: globals__default.browser
1968
+ name: "@rhyster/eslint-config/files-ts",
1969
+ files: ["**/*.ts"]
1970
+ },
1971
+ {
1972
+ name: "@rhyster/eslint-config/files-vue",
1973
+ files: ["**/*.vue"]
1974
+ },
1975
+ generalVue,
1976
+ ...ts__default.configs.strictTypeChecked.map((config) => {
1977
+ if (config.files?.includes("**/*.ts") === true) {
1978
+ return {
1979
+ ...config,
1980
+ files: [...config.files, "**/*.vue"]
1981
+ };
1915
1982
  }
1916
- }
1983
+ return config;
1984
+ }),
1985
+ ...ts__default.configs.stylisticTypeChecked.map((config) => {
1986
+ if (config.files?.includes("**/*.ts") === true) {
1987
+ return {
1988
+ ...config,
1989
+ files: [...config.files, "**/*.vue"]
1990
+ };
1991
+ }
1992
+ return config;
1993
+ }),
1994
+ bestPractices,
1995
+ errors,
1996
+ style,
1997
+ variables,
1998
+ es6,
1999
+ imports,
2000
+ strict,
2001
+ typescript,
2002
+ browserRules,
2003
+ ...vuePlugin__default.configs["flat/recommended"],
2004
+ setupVue
1917
2005
  ];
1918
2006
 
1919
2007
  exports.browser = browser;
1920
2008
  exports.core = core;
1921
2009
  exports.node = node;
2010
+ exports.vue = vue;
1922
2011
  //# sourceMappingURL=index.cjs.map