godaddy / eslint-plugin-i18n-json

Fully extendable eslint plugin for JSON i18n translation files.
https://godaddy.github.io/2018/04/02/introducing-eslint-plugin-i18n-json/
MIT License
182 stars 25 forks source link

Expected space or tab after '/*' in comment spaced-comment #28

Closed pauldcomanici closed 4 years ago

pauldcomanici commented 5 years ago

Versions

node -v: v10.16.3 npm -v: 6.9.0

Eslint version from package.json

    "eslint": "6.7.1",
    "eslint-loader": "3.0.2",
    "eslint-plugin-cypress": "2.7.0",
    "eslint-plugin-i18n-json": "2.4.3",
    "eslint-plugin-import": "2.18.2",
    "eslint-plugin-react": "7.16.0",
    "eslint-plugin-react-hooks": "2.3.0",
    "eslint-plugin-require-jsdoc-except": "1.3.0",

File used

File name:

en-us.json

Content:

{
  "TEST": "test"
}

Rules

.eslintrc file contains:

{
  "extends": [
    "plugin:i18n-json/recommended"
  ],
  "rules": {
    "i18n-json/identical-keys": 0, // we have only one file
    "i18n-json/sorted-keys": 2,
    "i18n-json/valid-json": 2,
    "i18n-json/valid-message-syntax": [
      2,
      {
        "syntax": "icu"
      }
    ]
  },
  "settings": {
    "i18n-json/ignore-keys": [ // add in this array string keys that have empty value
    ]
  }
}

Script

In package.json I execute script:

"lint-locale": "eslint --ext .json ./src/modules/l10n/strings",

Note: Inside ./src/modules/l10n/strings I have .eslintrc file.

Issue

When running linting script I get:

src/modules/l10n/strings/en-us.json
  1:1  error  Expected space or tab after '/*' in comment  spaced-comment
  3:4  error  Expected space or tab after '/*' in comment  spaced-comment

Note: Reverting back to v2.4.2 I do not get any error.

mayank23 commented 4 years ago

Thanks for the issue @darkyndy .

Fixed in v2.4.4 . Version was just published. If this issue still persists, please open a new issue, thanks!

pauldcomanici commented 4 years ago

Updated to v2.4.4 and issue was fixed. Thanks @mayank23