Skip to content

Commit 324c620

Browse files
committed
Renamed rule no-literals -> jsx-no-literals
1 parent 18c0369 commit 324c620

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Finally, enable all of the rules that you would like to use.
7575
* [jsx-curly-spacing](docs/rules/jsx-curly-spacing.md): Enforce or disallow spaces inside of curly braces in JSX attributes
7676
* [jsx-max-props-per-line](docs/rules/jsx-max-props-per-line.md): Limit maximum of props on a single line in JSX
7777
* [jsx-no-duplicate-props](docs/rules/jsx-no-duplicate-props.md): Prevent duplicate props in JSX
78+
* [jsx-no-literals](docs/rules/jsx-no-literals.md): Prevent usage of unwrapped JSX strings
7879
* [jsx-no-undef](docs/rules/jsx-no-undef.md): Disallow undeclared variables in JSX
7980
* [jsx-quotes](docs/rules/jsx-quotes.md): Enforce quote style for JSX attributes
8081
* [jsx-sort-prop-types](docs/rules/jsx-sort-prop-types.md): Enforce propTypes declarations alphabetical sorting
@@ -84,7 +85,6 @@ Finally, enable all of the rules that you would like to use.
8485
* [no-danger](docs/rules/no-danger.md): Prevent usage of dangerous JSX properties
8586
* [no-did-mount-set-state](docs/rules/no-did-mount-set-state.md): Prevent usage of setState in componentDidMount
8687
* [no-did-update-set-state](docs/rules/no-did-update-set-state.md): Prevent usage of setState in componentDidUpdate
87-
* [no-literals](docs/rules/no-literals.md): Prevent usage of unwrapped JSX strings
8888
* [no-multi-comp](docs/rules/no-multi-comp.md): Prevent multiple component definition per file
8989
* [no-unknown-property](docs/rules/no-unknown-property.md): Prevent usage of unknown DOM property
9090
* [prop-types](docs/rules/prop-types.md): Prevent missing props validation in a React component definition

docs/rules/no-literals.md renamed to docs/rules/jsx-no-literals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Prevent usage of unwrapped JSX strings (no-literals)
1+
# Prevent usage of unwrapped JSX strings (jsx-no-literals)
22

33
In JSX when using a literal string you can wrap it in a JXS container `{'TEXT'}`.
44
This rules requies that you wrap all literal strings.

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ module.exports = {
2424
'require-extension': require('./lib/rules/require-extension'),
2525
'jsx-no-duplicate-props': require('./lib/rules/jsx-no-duplicate-props'),
2626
'jsx-max-props-per-line': require('./lib/rules/jsx-max-props-per-line'),
27-
'no-literals': require('./lib/rules/no-literals')
27+
'jsx-no-literals': require('./lib/rules/jsx-no-literals')
2828
},
2929
rulesConfig: {
3030
'jsx-uses-react': 0,
@@ -49,6 +49,6 @@ module.exports = {
4949
'require-extension': 0,
5050
'jsx-no-duplicate-props': 0,
5151
'jsx-max-props-per-line': 0,
52-
'no-literals': 0
52+
'jsx-no-literals': 0
5353
}
5454
};
File renamed without changes.

tests/lib/rules/no-literals.js renamed to tests/lib/rules/jsx-no-literals.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ var ESLintTester = require('eslint').ESLintTester;
1616
// ------------------------------------------------------------------------------
1717

1818
var eslintTester = new ESLintTester(eslint);
19-
eslintTester.addRuleTest('lib/rules/no-literals', {
19+
eslintTester.addRuleTest('lib/rules/jsx-no-literals', {
2020

2121
valid: [
2222
{

0 commit comments

Comments
 (0)