Skip to content

Commit

Permalink
feat: add eslint role for no message description
Browse files Browse the repository at this point in the history
  This uses an eslint role for getting strings with no
  descriptions, this for demonstration purpose and can be used
  for checking other MFEs or JS/React base repos

  Ref: openedx/wg-translations/issues/5
  Related discussion: openedx/frontend-app-learning/pull/1143
  • Loading branch information
ghassanmas committed Sep 27, 2023
1 parent 982bbb7 commit 0a32690
Show file tree
Hide file tree
Showing 3 changed files with 306 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
const { babel } = require('../lib/presets');

module.exports = {
// Docs for formatjs plugin:
// https://formatjs.io/docs/tooling/linter/#react
plugins: ['formatjs'],
extends: '@edx/eslint-config',
parser: '@babel/eslint-parser',
parserOptions: {
Expand Down Expand Up @@ -35,6 +38,7 @@ module.exports = {
}],
'import/no-import-module-export': 'off',
'react/function-component-definition': [2, { namedComponents: 'arrow-function' }],
'formatjs/enforce-description': ['error', 'literal'],
},
globals: {
newrelic: false,
Expand Down
301 changes: 301 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0a32690

Please sign in to comment.