@switz/eslint-config 12.0.5 → 12.1.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/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ HI
2
+
1
3
  # switz's eslint-config
2
4
 
3
5
  ## Motivation
package/eslint.config.mjs CHANGED
@@ -1,7 +1,16 @@
1
+ import globals from 'globals';
1
2
  import js from '@eslint/js';
2
3
  import prettierPlugin from 'eslint-plugin-prettier/recommended';
3
4
 
4
5
  export default [
6
+ {
7
+ languageOptions: {
8
+ globals: {
9
+ ...globals.browser,
10
+ ...globals.nodeBuiltin,
11
+ },
12
+ },
13
+ },
5
14
  js.configs.recommended,
6
15
  {
7
16
  files: ['**/*.{js,jsx,ts,tsx}'],
@@ -30,4 +39,27 @@ export default [
30
39
  },
31
40
  },
32
41
  prettierPlugin,
42
+ {
43
+ rules: {
44
+ 'prettier/prettier': [
45
+ 'error',
46
+ {
47
+ singleQuote: true,
48
+ trailingComma: 'es5',
49
+ printWidth: 100,
50
+ quoteProps: 'consistent',
51
+ endOfLine: 'auto',
52
+ },
53
+ ],
54
+ },
55
+ },
33
56
  ];
57
+
58
+ // export default {
59
+ // plugins: ['prettier-plugin-tailwindcss'],
60
+ // singleQuote: true,
61
+ // trailingComma: 'es5',
62
+ // printWidth: 100,
63
+ // quoteProps: 'consistent',
64
+ // endOfLine: 'auto',
65
+ // };
@@ -3,6 +3,10 @@
3
3
  This is a test file
4
4
 
5
5
  <div>
6
- {[1, 2323]}
6
+ {[1, 2323]}
7
7
  test
8
8
  </div>
9
+
10
+ ```js
11
+ const hi = 2;
12
+ ```
@@ -1 +1,2 @@
1
1
  export const foo = 34;
2
+ export const quotes = 'hello';
package/mdx.mjs CHANGED
@@ -1,15 +1,17 @@
1
+ import main from './eslint.config.mjs';
1
2
  import * as mdx from 'eslint-plugin-mdx';
2
3
 
3
4
  export default [
4
- // ...main,
5
+ ...main,
5
6
  {
6
7
  ...mdx.flat,
7
- languageOptions: {
8
- parserOptions: {
9
- markdownExtensions: ['mdx', 'md'],
10
- },
11
- },
12
- // optional, if you want to lint code blocks at the same
8
+ // files: ['**/*.mdx'],
9
+ // languageOptions: {
10
+ // // parserOptions: {
11
+ // // markdownExtensions: ['mdx', 'md'],
12
+ // // },
13
+ // },
14
+ // // optional, if you want to lint code blocks at the same
13
15
  processor: mdx.createRemarkProcessor({
14
16
  lintCodeBlocks: true,
15
17
  // optional, if you want to disable language mapper, set it to `false`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@switz/eslint-config",
3
- "version": "12.0.5",
3
+ "version": "12.1.0",
4
4
  "description": "",
5
5
  "main": "eslintrc.cjs",
6
6
  "type": "module",
@@ -20,6 +20,7 @@
20
20
  "eslint-plugin-prettier": "^5.1.3",
21
21
  "eslint-plugin-react": "^7.34.2",
22
22
  "eslint-plugin-tailwindcss": "^3.17.0",
23
+ "globals": "^16.0.0",
23
24
  "prettier": "3.5.3",
24
25
  "prettier-plugin-tailwindcss": "^0.6.11",
25
26
  "typescript-eslint": "^8.29.0"
@@ -1,8 +0,0 @@
1
- export default {
2
- plugins: ['prettier-plugin-tailwindcss'],
3
- singleQuote: true,
4
- trailingComma: 'es5',
5
- printWidth: 100,
6
- quoteProps: 'consistent',
7
- endOfLine: 'auto',
8
- };