immosquare-cleaner 0.1.9 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/lib/immosquare-cleaner/markdown.rb +102 -0
  3. data/lib/immosquare-cleaner/version.rb +1 -1
  4. data/lib/immosquare-cleaner.rb +15 -2
  5. data/linters/eslintrc.json +54 -27
  6. data/package.json +7 -8
  7. metadata +31 -69
  8. data/node_modules/eslint-plugin-jsonc/LICENSE +0 -21
  9. data/node_modules/eslint-plugin-jsonc/README.md +0 -279
  10. data/node_modules/eslint-plugin-jsonc/conf/eslint-all.js +0 -11
  11. data/node_modules/eslint-plugin-jsonc/conf/eslint-recommended.js +0 -13
  12. data/node_modules/eslint-plugin-jsonc/conf/rules.js +0 -10
  13. data/node_modules/eslint-plugin-jsonc/dist/configs/all.js +0 -18
  14. data/node_modules/eslint-plugin-jsonc/dist/configs/auto-config.js +0 -13
  15. data/node_modules/eslint-plugin-jsonc/dist/configs/base.js +0 -15
  16. data/node_modules/eslint-plugin-jsonc/dist/configs/prettier.js +0 -26
  17. data/node_modules/eslint-plugin-jsonc/dist/configs/recommended-with-json.js +0 -41
  18. data/node_modules/eslint-plugin-jsonc/dist/configs/recommended-with-json5.js +0 -30
  19. data/node_modules/eslint-plugin-jsonc/dist/configs/recommended-with-jsonc.js +0 -39
  20. data/node_modules/eslint-plugin-jsonc/dist/index.js +0 -68
  21. data/node_modules/eslint-plugin-jsonc/dist/meta.js +0 -5
  22. data/node_modules/eslint-plugin-jsonc/dist/rules/array-bracket-newline.js +0 -23
  23. data/node_modules/eslint-plugin-jsonc/dist/rules/array-bracket-spacing.js +0 -23
  24. data/node_modules/eslint-plugin-jsonc/dist/rules/array-element-newline.js +0 -23
  25. data/node_modules/eslint-plugin-jsonc/dist/rules/auto.js +0 -66
  26. data/node_modules/eslint-plugin-jsonc/dist/rules/comma-dangle.js +0 -27
  27. data/node_modules/eslint-plugin-jsonc/dist/rules/comma-style.js +0 -23
  28. data/node_modules/eslint-plugin-jsonc/dist/rules/indent.js +0 -23
  29. data/node_modules/eslint-plugin-jsonc/dist/rules/key-name-casing.js +0 -94
  30. data/node_modules/eslint-plugin-jsonc/dist/rules/key-spacing.js +0 -23
  31. data/node_modules/eslint-plugin-jsonc/dist/rules/no-bigint-literals.js +0 -33
  32. data/node_modules/eslint-plugin-jsonc/dist/rules/no-binary-expression.js +0 -38
  33. data/node_modules/eslint-plugin-jsonc/dist/rules/no-binary-numeric-literals.js +0 -39
  34. data/node_modules/eslint-plugin-jsonc/dist/rules/no-comments.js +0 -34
  35. data/node_modules/eslint-plugin-jsonc/dist/rules/no-dupe-keys.js +0 -23
  36. data/node_modules/eslint-plugin-jsonc/dist/rules/no-escape-sequence-in-identifier.js +0 -57
  37. data/node_modules/eslint-plugin-jsonc/dist/rules/no-floating-decimal.js +0 -23
  38. data/node_modules/eslint-plugin-jsonc/dist/rules/no-hexadecimal-numeric-literals.js +0 -39
  39. data/node_modules/eslint-plugin-jsonc/dist/rules/no-infinity.js +0 -37
  40. data/node_modules/eslint-plugin-jsonc/dist/rules/no-irregular-whitespace.js +0 -23
  41. data/node_modules/eslint-plugin-jsonc/dist/rules/no-multi-str.js +0 -23
  42. data/node_modules/eslint-plugin-jsonc/dist/rules/no-nan.js +0 -37
  43. data/node_modules/eslint-plugin-jsonc/dist/rules/no-number-props.js +0 -41
  44. data/node_modules/eslint-plugin-jsonc/dist/rules/no-numeric-separators.js +0 -42
  45. data/node_modules/eslint-plugin-jsonc/dist/rules/no-octal-escape.js +0 -23
  46. data/node_modules/eslint-plugin-jsonc/dist/rules/no-octal-numeric-literals.js +0 -39
  47. data/node_modules/eslint-plugin-jsonc/dist/rules/no-octal.js +0 -23
  48. data/node_modules/eslint-plugin-jsonc/dist/rules/no-parenthesized.js +0 -70
  49. data/node_modules/eslint-plugin-jsonc/dist/rules/no-plus-sign.js +0 -39
  50. data/node_modules/eslint-plugin-jsonc/dist/rules/no-regexp-literals.js +0 -33
  51. data/node_modules/eslint-plugin-jsonc/dist/rules/no-sparse-arrays.js +0 -23
  52. data/node_modules/eslint-plugin-jsonc/dist/rules/no-template-literals.js +0 -36
  53. data/node_modules/eslint-plugin-jsonc/dist/rules/no-undefined-value.js +0 -35
  54. data/node_modules/eslint-plugin-jsonc/dist/rules/no-unicode-codepoint-escapes.js +0 -73
  55. data/node_modules/eslint-plugin-jsonc/dist/rules/no-useless-escape.js +0 -23
  56. data/node_modules/eslint-plugin-jsonc/dist/rules/object-curly-newline.js +0 -23
  57. data/node_modules/eslint-plugin-jsonc/dist/rules/object-curly-spacing.js +0 -23
  58. data/node_modules/eslint-plugin-jsonc/dist/rules/object-property-newline.js +0 -23
  59. data/node_modules/eslint-plugin-jsonc/dist/rules/quote-props.js +0 -27
  60. data/node_modules/eslint-plugin-jsonc/dist/rules/quotes.js +0 -27
  61. data/node_modules/eslint-plugin-jsonc/dist/rules/sort-array-values.js +0 -371
  62. data/node_modules/eslint-plugin-jsonc/dist/rules/sort-keys.js +0 -413
  63. data/node_modules/eslint-plugin-jsonc/dist/rules/space-unary-ops.js +0 -23
  64. data/node_modules/eslint-plugin-jsonc/dist/rules/valid-json-number.js +0 -138
  65. data/node_modules/eslint-plugin-jsonc/dist/rules/vue-custom-block/no-parsing-error.js +0 -86
  66. data/node_modules/eslint-plugin-jsonc/dist/types.js +0 -2
  67. data/node_modules/eslint-plugin-jsonc/dist/utils/casing.js +0 -134
  68. data/node_modules/eslint-plugin-jsonc/dist/utils/get-auto-jsonc-rules-config.js +0 -97
  69. data/node_modules/eslint-plugin-jsonc/dist/utils/index.js +0 -121
  70. data/node_modules/eslint-plugin-jsonc/dist/utils/rules.js +0 -96
  71. data/node_modules/eslint-plugin-jsonc/index.d.ts +0 -364
  72. data/node_modules/eslint-plugin-jsonc/package.json +0 -123
@@ -1,279 +0,0 @@
1
- # Introduction
2
-
3
- [eslint-plugin-jsonc](https://www.npmjs.com/package/eslint-plugin-jsonc) is ESLint plugin for [JSON], [JSONC] and [JSON5] files.
4
-
5
- [![NPM license](https://img.shields.io/npm/l/eslint-plugin-jsonc.svg)](https://www.npmjs.com/package/eslint-plugin-jsonc)
6
- [![NPM version](https://img.shields.io/npm/v/eslint-plugin-jsonc.svg)](https://www.npmjs.com/package/eslint-plugin-jsonc)
7
- [![NPM downloads](https://img.shields.io/badge/dynamic/json.svg?label=downloads&colorB=green&suffix=/day&query=$.downloads&uri=https://api.npmjs.org//downloads/point/last-day/eslint-plugin-jsonc&maxAge=3600)](http://www.npmtrends.com/eslint-plugin-jsonc)
8
- [![NPM downloads](https://img.shields.io/npm/dw/eslint-plugin-jsonc.svg)](http://www.npmtrends.com/eslint-plugin-jsonc)
9
- [![NPM downloads](https://img.shields.io/npm/dm/eslint-plugin-jsonc.svg)](http://www.npmtrends.com/eslint-plugin-jsonc)
10
- [![NPM downloads](https://img.shields.io/npm/dy/eslint-plugin-jsonc.svg)](http://www.npmtrends.com/eslint-plugin-jsonc)
11
- [![NPM downloads](https://img.shields.io/npm/dt/eslint-plugin-jsonc.svg)](http://www.npmtrends.com/eslint-plugin-jsonc)
12
- [![Build Status](https://github.com/ota-meshi/eslint-plugin-jsonc/workflows/CI/badge.svg?branch=master)](https://github.com/ota-meshi/eslint-plugin-jsonc/actions?query=workflow%3ACI)
13
- [![Coverage Status](https://coveralls.io/repos/github/ota-meshi/eslint-plugin-jsonc/badge.svg?branch=master)](https://coveralls.io/github/ota-meshi/eslint-plugin-jsonc?branch=master)
14
-
15
- ## :name_badge: Features
16
-
17
- This ESLint plugin provides linting rules relate to better ways to help you avoid problems when using [JSON], [JSONC] and [JSON5].
18
-
19
- - You can use ESLint to lint [JSON].
20
- - You can apply rules similar to the rules you use for JavaScript to JSON using the [`"jsonc/auto"`](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/auto.html) rule provided by this plugin.
21
- - You can choose the appropriate config provided by this plugin depending on whether you are using [JSON], [JSONC] or [JSON5].
22
- - Supports [Vue SFC](https://vue-loader.vuejs.org/spec.html) custom blocks such as `<i18n>`.
23
- Requirements `vue-eslint-parser` v7.3.0 and above.
24
- - Supports ESLint directives. e.g. `// eslint-disable-next-line`
25
- - You can check your code in real-time using the ESLint editor integrations.
26
-
27
- You can check on the [Online DEMO](https://ota-meshi.github.io/eslint-plugin-jsonc/playground/).
28
-
29
- ## :question: Why is it ESLint plugin?
30
-
31
- ESLint is a great linter for JavaScript.
32
- Since [JSON] is a subset of JavaScript, the same parser and rules can be applied to [JSON].
33
- Also, [JSONC] and [JSON5], which are variants of [JSON], are more similar to JavaScript than [JSON]. Applying a JavaScript linter to [JSON] is more rational than creating a JSON-specific linter.
34
-
35
- ### How does `eslint-plugin-jsonc` work?
36
-
37
- This plugin parses `.json` with its own parser, but this parser just converts AST parsed by `acorn` (It is used internally by the ESLint standard parser) into AST with another name. However, ASTs that do not exist in [JSON] and the superset of JSON syntaxes are reported as parsing errors. By converting the AST to another name, we prevent false positives from ESLint core rules.
38
- Moreover, You can do the same linting using the extended rules of the ESLint core rules provided by this plugin.
39
-
40
- The parser package used by this plugin is [jsonc-eslint-parser].
41
-
42
- ## :question: How is it different from other JSON plugins?
43
-
44
- ### Plugins that do not use AST
45
-
46
- e.g. [eslint-plugin-json](https://www.npmjs.com/package/eslint-plugin-json)
47
-
48
- These plugins use the processor to parse and return the results independently, without providing the ESLint engine with AST and source code text.
49
-
50
- Plugins don't provide AST, so you can't use directive comments (e.g. `/* eslint-disable */`).
51
- Plugins don't provide source code text, so you can't use it with plugins and rules that use text (e.g. [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier), [eol-last](https://eslint.org/docs/rules/eol-last)).
52
- Also, most plugins don't support JSON5.
53
-
54
- **eslint-plugin-jsonc** works by providing AST and source code text to ESLint.
55
-
56
- ### Plugins that use the same AST as JavaScript
57
-
58
- e.g. [eslint-plugin-json-files](https://www.npmjs.com/package/eslint-plugin-json-files), [eslint-plugin-json-es](https://www.npmjs.com/package/eslint-plugin-json-es)
59
-
60
- These plugins use the same AST as JavaScript for linting.
61
-
62
- Since the plugin uses the same AST as JavaScript, it may not report syntax that is not available in JSON (e.g. `1 + 1`, `(42)`). Also, ESLint core rules and other plugin rules can false positives (e.g. [quote-props](https://eslint.org/docs/rules/quote-props) rule reports quote on keys), which can complicate the your configuration.
63
-
64
- The AST used by **eslint-plugin-jsonc** is similar to JavaScript AST, but with a different node name. This will prevent false positives. This means that it can be easily used in combination with other plugins.
65
-
66
- <!--DOCS_IGNORE_START-->
67
-
68
- ## :book: Documentation
69
-
70
- See [documents](https://ota-meshi.github.io/eslint-plugin-jsonc/).
71
-
72
- ## :cd: Installation
73
-
74
- ```bash
75
- npm install --save-dev eslint eslint-plugin-jsonc
76
- ```
77
-
78
- > **Requirements**
79
- >
80
- > - ESLint v6.0.0 and above
81
- > - Node.js v12.22.x, v14.17.x, v16.x and above
82
-
83
- <!--DOCS_IGNORE_END-->
84
-
85
- ## :book: Usage
86
-
87
- <!--USAGE_SECTION_START-->
88
- <!--USAGE_GUIDE_START-->
89
-
90
- ### Configuration
91
-
92
- Use `.eslintrc.*` file to configure rules. See also: [https://eslint.org/docs/user-guide/configuring](https://eslint.org/docs/user-guide/configuring).
93
-
94
- Example **.eslintrc.js**:
95
-
96
- ```js
97
- module.exports = {
98
- extends: [
99
- // add more generic rulesets here, such as:
100
- // 'eslint:recommended',
101
- "plugin:jsonc/recommended-with-jsonc",
102
- ],
103
- rules: {
104
- // override/add rules settings here, such as:
105
- // 'jsonc/rule-name': 'error'
106
- },
107
- };
108
- ```
109
-
110
- This plugin provides configs:
111
-
112
- - `plugin:jsonc/base` ... Configuration to enable correct JSON parsing.
113
- - `plugin:jsonc/recommended-with-json` ... Recommended configuration for JSON.
114
- - `plugin:jsonc/recommended-with-jsonc` ... Recommended configuration for JSONC.
115
- - `plugin:jsonc/recommended-with-json5` ... Recommended configuration for JSON5.
116
- - `plugin:jsonc/prettier` ... Turn off rules that may conflict with [Prettier](https://prettier.io/).
117
- - `plugin:jsonc/all` ... Enables all rules. It's meant for testing, not for production use because it changes with every minor and major version of the plugin. Use it at your own risk.
118
-
119
- This plugin will parse `.json`, `.jsonc` and `.json5` by default using the configuration provided by the plugin (unless you already have a parser configured - see below).
120
-
121
- See [the rule list](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/) to get the `rules` that this plugin provides.
122
-
123
- #### Parser Configuration
124
-
125
- If you have already specified a parser in your `.eslintrc`, you will also need to manually configure the parser for JSON files (your parser config takes priority over that defined by `extends` shared configs).
126
-
127
- For example, if you are using the `"@babel/eslint-parser"`, configure it as follows:
128
-
129
- ```js
130
- module.exports = {
131
- // ...
132
- extends: ["plugin:jsonc/recommended-with-jsonc"],
133
- // ...
134
- parser: "@babel/eslint-parser",
135
- // Add an `overrides` section to add a parser configuration for json.
136
- overrides: [
137
- {
138
- files: ["*.json", "*.json5", "*.jsonc"],
139
- parser: "jsonc-eslint-parser",
140
- },
141
- ],
142
- // ...
143
- };
144
- ```
145
-
146
- ## :computer: Editor Integrations
147
-
148
- ### Visual Studio Code
149
-
150
- Use the [dbaeumer.vscode-eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) extension that Microsoft provides officially.
151
-
152
- You have to configure the `eslint.validate` option of the extension to check `.json` files, because the extension targets only `*.js` or `*.jsx` files by default.
153
-
154
- Example **.vscode/settings.json**:
155
-
156
- ```json
157
- {
158
- "eslint.validate": ["javascript", "javascriptreact", "json", "jsonc", "json5"]
159
- }
160
- ```
161
-
162
- <!--USAGE_GUIDE_END-->
163
- <!--USAGE_SECTION_END-->
164
-
165
- ## :white_check_mark: Rules
166
-
167
- <!--RULES_SECTION_START-->
168
-
169
- The `--fix` option on the [command line](https://eslint.org/docs/user-guide/command-line-interface#fixing-problems) automatically fixes problems reported by rules which have a wrench :wrench: below.
170
- The rules with the following star :star: are included in the config.
171
-
172
- <!--RULES_TABLE_START-->
173
-
174
- ### JSONC Rules
175
-
176
- | Rule ID | Description | Fixable | JSON | JSONC | JSON5 |
177
- |:--------|:------------|:-------:|:----:|:-----:|:-----:|
178
- | [jsonc/auto](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/auto.html) | apply jsonc rules similar to your configured ESLint core rules | :wrench: | | | |
179
- | [jsonc/key-name-casing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-name-casing.html) | enforce naming convention to property key names | | | | |
180
- | [jsonc/no-bigint-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-bigint-literals.html) | disallow BigInt literals | | :star: | :star: | :star: |
181
- | [jsonc/no-binary-expression](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-expression.html) | disallow binary expression | :wrench: | :star: | :star: | :star: |
182
- | [jsonc/no-binary-numeric-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-binary-numeric-literals.html) | disallow binary numeric literals | :wrench: | :star: | :star: | :star: |
183
- | [jsonc/no-comments](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-comments.html) | disallow comments | | :star: | | |
184
- | [jsonc/no-escape-sequence-in-identifier](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-escape-sequence-in-identifier.html) | disallow escape sequences in identifiers. | :wrench: | :star: | :star: | :star: |
185
- | [jsonc/no-hexadecimal-numeric-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-hexadecimal-numeric-literals.html) | disallow hexadecimal numeric literals | :wrench: | :star: | :star: | |
186
- | [jsonc/no-infinity](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-infinity.html) | disallow Infinity | | :star: | :star: | |
187
- | [jsonc/no-nan](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-nan.html) | disallow NaN | | :star: | :star: | |
188
- | [jsonc/no-number-props](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-number-props.html) | disallow number property keys | :wrench: | :star: | :star: | :star: |
189
- | [jsonc/no-numeric-separators](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-numeric-separators.html) | disallow numeric separators | :wrench: | :star: | :star: | :star: |
190
- | [jsonc/no-octal-numeric-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-numeric-literals.html) | disallow octal numeric literals | :wrench: | :star: | :star: | :star: |
191
- | [jsonc/no-parenthesized](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-parenthesized.html) | disallow parentheses around the expression | :wrench: | :star: | :star: | :star: |
192
- | [jsonc/no-plus-sign](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-plus-sign.html) | disallow plus sign | :wrench: | :star: | :star: | |
193
- | [jsonc/no-regexp-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-regexp-literals.html) | disallow RegExp literals | | :star: | :star: | :star: |
194
- | [jsonc/no-template-literals](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-template-literals.html) | disallow template literals | :wrench: | :star: | :star: | :star: |
195
- | [jsonc/no-undefined-value](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-undefined-value.html) | disallow `undefined` | | :star: | :star: | :star: |
196
- | [jsonc/no-unicode-codepoint-escapes](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-unicode-codepoint-escapes.html) | disallow Unicode code point escape sequences. | :wrench: | :star: | :star: | :star: |
197
- | [jsonc/sort-array-values](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-array-values.html) | require array values to be sorted | :wrench: | | | |
198
- | [jsonc/sort-keys](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/sort-keys.html) | require object keys to be sorted | :wrench: | | | |
199
- | [jsonc/valid-json-number](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/valid-json-number.html) | disallow invalid number for JSON | :wrench: | :star: | :star: | |
200
- | [jsonc/vue-custom-block/no-parsing-error](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/vue-custom-block/no-parsing-error.html) | disallow parsing errors in Vue custom blocks | | :star: | :star: | :star: |
201
-
202
- ### Extension Rules
203
-
204
- | Rule ID | Description | Fixable | JSON | JSONC | JSON5 |
205
- |:--------|:------------|:-------:|:----:|:-----:|:-----:|
206
- | [jsonc/array-bracket-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-newline.html) | enforce line breaks after opening and before closing array brackets | :wrench: | | | |
207
- | [jsonc/array-bracket-spacing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-bracket-spacing.html) | disallow or enforce spaces inside of brackets | :wrench: | | | |
208
- | [jsonc/array-element-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/array-element-newline.html) | enforce line breaks between array elements | :wrench: | | | |
209
- | [jsonc/comma-dangle](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-dangle.html) | require or disallow trailing commas | :wrench: | :star: | | |
210
- | [jsonc/comma-style](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/comma-style.html) | enforce consistent comma style | :wrench: | | | |
211
- | [jsonc/indent](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/indent.html) | enforce consistent indentation | :wrench: | | | |
212
- | [jsonc/key-spacing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/key-spacing.html) | enforce consistent spacing between keys and values in object literal properties | :wrench: | | | |
213
- | [jsonc/no-dupe-keys](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-dupe-keys.html) | disallow duplicate keys in object literals | | :star: | :star: | :star: |
214
- | [jsonc/no-floating-decimal](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-floating-decimal.html) | disallow leading or trailing decimal points in numeric literals | :wrench: | :star: | :star: | |
215
- | [jsonc/no-irregular-whitespace](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-irregular-whitespace.html) | disallow irregular whitespace | | | | |
216
- | [jsonc/no-multi-str](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-multi-str.html) | disallow multiline strings | | :star: | :star: | |
217
- | [jsonc/no-octal-escape](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal-escape.html) | disallow octal escape sequences in string literals | | | | |
218
- | [jsonc/no-octal](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-octal.html) | disallow legacy octal literals | | :star: | :star: | :star: |
219
- | [jsonc/no-sparse-arrays](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-sparse-arrays.html) | disallow sparse arrays | | :star: | :star: | :star: |
220
- | [jsonc/no-useless-escape](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/no-useless-escape.html) | disallow unnecessary escape usage | | :star: | :star: | :star: |
221
- | [jsonc/object-curly-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-newline.html) | enforce consistent line breaks inside braces | :wrench: | | | |
222
- | [jsonc/object-curly-spacing](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-curly-spacing.html) | enforce consistent spacing inside braces | :wrench: | | | |
223
- | [jsonc/object-property-newline](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/object-property-newline.html) | enforce placing object properties on separate lines | :wrench: | | | |
224
- | [jsonc/quote-props](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quote-props.html) | require quotes around object literal property names | :wrench: | :star: | :star: | |
225
- | [jsonc/quotes](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/quotes.html) | enforce use of double or single quotes | :wrench: | :star: | :star: | |
226
- | [jsonc/space-unary-ops](https://ota-meshi.github.io/eslint-plugin-jsonc/rules/space-unary-ops.html) | disallow spaces after unary operators | :wrench: | :star: | :star: | :star: |
227
-
228
- <!--RULES_TABLE_END-->
229
- <!--RULES_SECTION_END-->
230
-
231
- ## :rocket: To Do More Verification
232
-
233
- ### Verify using JSON Schema
234
-
235
- You can verify using JSON Schema by checking and installing [eslint-plugin-json-schema-validator].
236
-
237
- ### Verify the [Vue I18n] message resource files
238
-
239
- You can verify the message files by checking and installing [@intlify/eslint-plugin-vue-i18n].
240
-
241
- <!--DOCS_IGNORE_START-->
242
-
243
- ## :traffic_light: Semantic Versioning Policy
244
-
245
- **eslint-plugin-jsonc** follows [Semantic Versioning](http://semver.org/) and [ESLint's Semantic Versioning Policy](https://github.com/eslint/eslint#semantic-versioning-policy).
246
-
247
- ## :beers: Contributing
248
-
249
- Welcome contributing!
250
-
251
- Please use GitHub's Issues/PRs.
252
-
253
- ### Development Tools
254
-
255
- - `npm test` runs tests and measures coverage.
256
- - `npm run update` runs in order to update readme and recommended configuration.
257
-
258
- <!--DOCS_IGNORE_END-->
259
-
260
- ## :couple: Related Packages
261
-
262
- - [eslint-plugin-yml](https://github.com/ota-meshi/eslint-plugin-yml) ... ESLint plugin for YAML.
263
- - [eslint-plugin-toml](https://github.com/ota-meshi/eslint-plugin-toml) ... ESLint plugin for TOML.
264
- - [eslint-plugin-json-schema-validator](https://github.com/ota-meshi/eslint-plugin-json-schema-validator) ... ESLint plugin that validates data using JSON Schema Validator.
265
- - [jsonc-eslint-parser](https://github.com/ota-meshi/jsonc-eslint-parser) ... JSON, JSONC and JSON5 parser for use with ESLint plugins.
266
- - [yaml-eslint-parser](https://github.com/ota-meshi/yaml-eslint-parser) ... YAML parser for use with ESLint plugins.
267
- - [toml-eslint-parser](https://github.com/ota-meshi/toml-eslint-parser) ... TOML parser for use with ESLint plugins.
268
-
269
- ## :lock: License
270
-
271
- See the [LICENSE](LICENSE) file for license rights and limitations (MIT).
272
-
273
- [json]: https://json.org/
274
- [jsonc]: https://github.com/microsoft/node-jsonc-parser
275
- [json5]: https://json5.org/
276
- [jsonc-eslint-parser]: https://github.com/ota-meshi/jsonc-eslint-parser
277
- [eslint-plugin-json-schema-validator]: https://github.com/ota-meshi/eslint-plugin-json-schema-validator
278
- [@intlify/eslint-plugin-vue-i18n]: https://github.com/intlify/eslint-plugin-vue-i18n
279
- [vue i18n]: https://github.com/intlify/vue-i18n-next
@@ -1,11 +0,0 @@
1
- // @ts-nocheck
2
- const getCoreRules = require("./rules");
3
-
4
- const allRules = {};
5
-
6
- for (const [ruleId, rule] of getCoreRules()) {
7
- if (!rule.meta.deprecated) {
8
- allRules[ruleId] = "error";
9
- }
10
- }
11
- module.exports = { rules: allRules };
@@ -1,13 +0,0 @@
1
- // @ts-nocheck
2
- const getCoreRules = require("./rules");
3
-
4
- const rules = {};
5
-
6
- for (const [ruleId, rule] of getCoreRules()) {
7
- if (rule.meta.docs.recommended && !rule.meta.deprecated) {
8
- rules[ruleId] = "error";
9
- }
10
- }
11
- module.exports = {
12
- rules,
13
- };
@@ -1,10 +0,0 @@
1
- // @ts-nocheck
2
- let ruleMap;
3
-
4
- /** Get all rules */
5
- module.exports = function getCoreRules() {
6
- if (ruleMap) {
7
- return ruleMap;
8
- }
9
- return (ruleMap = new (require("eslint").Linter)().getRules());
10
- };
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- const rules_1 = require("../utils/rules");
6
- const path_1 = __importDefault(require("path"));
7
- const base = require.resolve("./base");
8
- const baseExtend = path_1.default.extname(`${base}`) === ".ts" ? "plugin:jsonc/base" : base;
9
- const all = {};
10
- for (const rule of rules_1.rules) {
11
- if (rule.meta.docs.ruleId === "jsonc/sort-array-values")
12
- continue;
13
- all[rule.meta.docs.ruleId] = "error";
14
- }
15
- module.exports = {
16
- extends: [baseExtend],
17
- rules: Object.assign({}, all),
18
- };
@@ -1,13 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- const path_1 = __importDefault(require("path"));
6
- const base = require.resolve("./base");
7
- const baseExtend = path_1.default.extname(`${base}`) === ".ts" ? "plugin:jsonc/base" : base;
8
- module.exports = {
9
- extends: [baseExtend],
10
- rules: {
11
- "jsonc/auto": "error",
12
- },
13
- };
@@ -1,15 +0,0 @@
1
- "use strict";
2
- module.exports = {
3
- plugins: ["jsonc"],
4
- overrides: [
5
- {
6
- files: ["*.json", "*.json5", "*.jsonc"],
7
- parser: require.resolve("jsonc-eslint-parser"),
8
- rules: {
9
- strict: "off",
10
- "no-unused-expressions": "off",
11
- "no-unused-vars": "off",
12
- },
13
- },
14
- ],
15
- };
@@ -1,26 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- const path_1 = __importDefault(require("path"));
6
- const base = require.resolve("./base");
7
- const baseExtend = path_1.default.extname(`${base}`) === ".ts" ? "plugin:jsonc/base" : base;
8
- module.exports = {
9
- extends: [baseExtend],
10
- rules: {
11
- "jsonc/array-bracket-newline": "off",
12
- "jsonc/array-bracket-spacing": "off",
13
- "jsonc/array-element-newline": "off",
14
- "jsonc/comma-dangle": "off",
15
- "jsonc/comma-style": "off",
16
- "jsonc/indent": "off",
17
- "jsonc/key-spacing": "off",
18
- "jsonc/no-floating-decimal": "off",
19
- "jsonc/object-curly-newline": "off",
20
- "jsonc/object-curly-spacing": "off",
21
- "jsonc/object-property-newline": "off",
22
- "jsonc/quote-props": "off",
23
- "jsonc/quotes": "off",
24
- "jsonc/space-unary-ops": "off",
25
- },
26
- };
@@ -1,41 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- const path_1 = __importDefault(require("path"));
6
- const base = require.resolve("./base");
7
- const baseExtend = path_1.default.extname(`${base}`) === ".ts" ? "plugin:jsonc/base" : base;
8
- module.exports = {
9
- extends: [baseExtend],
10
- rules: {
11
- "jsonc/comma-dangle": "error",
12
- "jsonc/no-bigint-literals": "error",
13
- "jsonc/no-binary-expression": "error",
14
- "jsonc/no-binary-numeric-literals": "error",
15
- "jsonc/no-comments": "error",
16
- "jsonc/no-dupe-keys": "error",
17
- "jsonc/no-escape-sequence-in-identifier": "error",
18
- "jsonc/no-floating-decimal": "error",
19
- "jsonc/no-hexadecimal-numeric-literals": "error",
20
- "jsonc/no-infinity": "error",
21
- "jsonc/no-multi-str": "error",
22
- "jsonc/no-nan": "error",
23
- "jsonc/no-number-props": "error",
24
- "jsonc/no-numeric-separators": "error",
25
- "jsonc/no-octal-numeric-literals": "error",
26
- "jsonc/no-octal": "error",
27
- "jsonc/no-parenthesized": "error",
28
- "jsonc/no-plus-sign": "error",
29
- "jsonc/no-regexp-literals": "error",
30
- "jsonc/no-sparse-arrays": "error",
31
- "jsonc/no-template-literals": "error",
32
- "jsonc/no-undefined-value": "error",
33
- "jsonc/no-unicode-codepoint-escapes": "error",
34
- "jsonc/no-useless-escape": "error",
35
- "jsonc/quote-props": "error",
36
- "jsonc/quotes": "error",
37
- "jsonc/space-unary-ops": "error",
38
- "jsonc/valid-json-number": "error",
39
- "jsonc/vue-custom-block/no-parsing-error": "error",
40
- },
41
- };
@@ -1,30 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- const path_1 = __importDefault(require("path"));
6
- const base = require.resolve("./base");
7
- const baseExtend = path_1.default.extname(`${base}`) === ".ts" ? "plugin:jsonc/base" : base;
8
- module.exports = {
9
- extends: [baseExtend],
10
- rules: {
11
- "jsonc/no-bigint-literals": "error",
12
- "jsonc/no-binary-expression": "error",
13
- "jsonc/no-binary-numeric-literals": "error",
14
- "jsonc/no-dupe-keys": "error",
15
- "jsonc/no-escape-sequence-in-identifier": "error",
16
- "jsonc/no-number-props": "error",
17
- "jsonc/no-numeric-separators": "error",
18
- "jsonc/no-octal-numeric-literals": "error",
19
- "jsonc/no-octal": "error",
20
- "jsonc/no-parenthesized": "error",
21
- "jsonc/no-regexp-literals": "error",
22
- "jsonc/no-sparse-arrays": "error",
23
- "jsonc/no-template-literals": "error",
24
- "jsonc/no-undefined-value": "error",
25
- "jsonc/no-unicode-codepoint-escapes": "error",
26
- "jsonc/no-useless-escape": "error",
27
- "jsonc/space-unary-ops": "error",
28
- "jsonc/vue-custom-block/no-parsing-error": "error",
29
- },
30
- };
@@ -1,39 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- const path_1 = __importDefault(require("path"));
6
- const base = require.resolve("./base");
7
- const baseExtend = path_1.default.extname(`${base}`) === ".ts" ? "plugin:jsonc/base" : base;
8
- module.exports = {
9
- extends: [baseExtend],
10
- rules: {
11
- "jsonc/no-bigint-literals": "error",
12
- "jsonc/no-binary-expression": "error",
13
- "jsonc/no-binary-numeric-literals": "error",
14
- "jsonc/no-dupe-keys": "error",
15
- "jsonc/no-escape-sequence-in-identifier": "error",
16
- "jsonc/no-floating-decimal": "error",
17
- "jsonc/no-hexadecimal-numeric-literals": "error",
18
- "jsonc/no-infinity": "error",
19
- "jsonc/no-multi-str": "error",
20
- "jsonc/no-nan": "error",
21
- "jsonc/no-number-props": "error",
22
- "jsonc/no-numeric-separators": "error",
23
- "jsonc/no-octal-numeric-literals": "error",
24
- "jsonc/no-octal": "error",
25
- "jsonc/no-parenthesized": "error",
26
- "jsonc/no-plus-sign": "error",
27
- "jsonc/no-regexp-literals": "error",
28
- "jsonc/no-sparse-arrays": "error",
29
- "jsonc/no-template-literals": "error",
30
- "jsonc/no-undefined-value": "error",
31
- "jsonc/no-unicode-codepoint-escapes": "error",
32
- "jsonc/no-useless-escape": "error",
33
- "jsonc/quote-props": "error",
34
- "jsonc/quotes": "error",
35
- "jsonc/space-unary-ops": "error",
36
- "jsonc/valid-json-number": "error",
37
- "jsonc/vue-custom-block/no-parsing-error": "error",
38
- },
39
- };
@@ -1,68 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.getStaticJSONValue = exports.traverseNodes = exports.parseJSON = exports.parseForESLint = exports.rules = exports.configs = exports.meta = void 0;
30
- const rules_1 = require("./utils/rules");
31
- const base_1 = __importDefault(require("./configs/base"));
32
- const auto_config_1 = __importDefault(require("./configs/auto-config"));
33
- const recommended_with_json_1 = __importDefault(require("./configs/recommended-with-json"));
34
- const recommended_with_jsonc_1 = __importDefault(require("./configs/recommended-with-jsonc"));
35
- const recommended_with_json5_1 = __importDefault(require("./configs/recommended-with-json5"));
36
- const prettier_1 = __importDefault(require("./configs/prettier"));
37
- const all_1 = __importDefault(require("./configs/all"));
38
- const meta = __importStar(require("./meta"));
39
- exports.meta = meta;
40
- const jsonc_eslint_parser_1 = require("jsonc-eslint-parser");
41
- Object.defineProperty(exports, "parseForESLint", { enumerable: true, get: function () { return jsonc_eslint_parser_1.parseForESLint; } });
42
- Object.defineProperty(exports, "parseJSON", { enumerable: true, get: function () { return jsonc_eslint_parser_1.parseJSON; } });
43
- Object.defineProperty(exports, "traverseNodes", { enumerable: true, get: function () { return jsonc_eslint_parser_1.traverseNodes; } });
44
- Object.defineProperty(exports, "getStaticJSONValue", { enumerable: true, get: function () { return jsonc_eslint_parser_1.getStaticJSONValue; } });
45
- const configs = {
46
- base: base_1.default,
47
- "auto-config": auto_config_1.default,
48
- "recommended-with-json": recommended_with_json_1.default,
49
- "recommended-with-jsonc": recommended_with_jsonc_1.default,
50
- "recommended-with-json5": recommended_with_json5_1.default,
51
- prettier: prettier_1.default,
52
- all: all_1.default,
53
- };
54
- exports.configs = configs;
55
- const rules = rules_1.rules.reduce((obj, r) => {
56
- obj[r.meta.docs.ruleName] = r;
57
- return obj;
58
- }, {});
59
- exports.rules = rules;
60
- exports.default = {
61
- meta,
62
- configs,
63
- rules,
64
- parseForESLint: jsonc_eslint_parser_1.parseForESLint,
65
- parseJSON: jsonc_eslint_parser_1.parseJSON,
66
- traverseNodes: jsonc_eslint_parser_1.traverseNodes,
67
- getStaticJSONValue: jsonc_eslint_parser_1.getStaticJSONValue,
68
- };
@@ -1,5 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.version = exports.name = void 0;
4
- exports.name = "eslint-plugin-jsonc";
5
- exports.version = "2.9.0";
@@ -1,23 +0,0 @@
1
- "use strict";
2
- var _a;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- const utils_1 = require("../utils");
5
- const coreRule = (0, utils_1.getCoreRule)("array-bracket-newline");
6
- exports.default = (0, utils_1.createRule)("array-bracket-newline", {
7
- meta: {
8
- docs: {
9
- description: "enforce line breaks after opening and before closing array brackets",
10
- recommended: null,
11
- extensionRule: true,
12
- layout: true,
13
- },
14
- fixable: (_a = coreRule.meta) === null || _a === void 0 ? void 0 : _a.fixable,
15
- hasSuggestions: coreRule.meta.hasSuggestions,
16
- schema: coreRule.meta.schema,
17
- messages: coreRule.meta.messages,
18
- type: coreRule.meta.type,
19
- },
20
- create(context) {
21
- return (0, utils_1.defineWrapperListener)(coreRule, context, context.options);
22
- },
23
- });
@@ -1,23 +0,0 @@
1
- "use strict";
2
- var _a;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- const utils_1 = require("../utils");
5
- const coreRule = (0, utils_1.getCoreRule)("array-bracket-spacing");
6
- exports.default = (0, utils_1.createRule)("array-bracket-spacing", {
7
- meta: {
8
- docs: {
9
- description: "disallow or enforce spaces inside of brackets",
10
- recommended: null,
11
- extensionRule: true,
12
- layout: true,
13
- },
14
- fixable: (_a = coreRule.meta) === null || _a === void 0 ? void 0 : _a.fixable,
15
- hasSuggestions: coreRule.meta.hasSuggestions,
16
- schema: coreRule.meta.schema,
17
- messages: coreRule.meta.messages,
18
- type: coreRule.meta.type,
19
- },
20
- create(context) {
21
- return (0, utils_1.defineWrapperListener)(coreRule, context, context.options);
22
- },
23
- });