Skip to content

Commit

Permalink
Allow __html property in react files (#11)
Browse files Browse the repository at this point in the history
* Fix react rule

* Update CHANGELOG.md

---------

Co-authored-by: Mikhail Volkov <[email protected]>
  • Loading branch information
asimonok and mikhail-vl authored Nov 22, 2023
1 parent 5029dc4 commit 99ce1bc
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
12 changes: 12 additions & 0 deletions packages/eslint-config/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Change Log

## 1.2.1 (2023-11-22)

### Features / Enhancements

- Allow \_\_html property in react files (#11)

## 1.2.0 (2023-11-22)

### Features / Enhancements

- Add ESLint naming convention rule (#10)

## 1.1.0 (2023-11-19)

### Features / Enhancements
Expand Down
4 changes: 4 additions & 0 deletions packages/eslint-config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ const getNamingConventionRule = ({ target = 'default' }) => ({
? {
selector: ['default'],
format: ['strictCamelCase', 'StrictPascalCase'],
filter: {
regex: '^__html$',
match: false,
},
}
: {
selector: ['default'],
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
"lint": "eslint './tests/**/*.{ts,tsx}'",
"test:ci": ""
},
"version": "1.2.0"
"version": "1.2.1"
}
2 changes: 1 addition & 1 deletion packages/eslint-config/tests/naming-convention.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@ export const service = new Service();
const Component: React.FC<null> = () => {
const onChange = () => {};

return <input onChange={onChange} />;
return <input onChange={onChange} dangerouslySetInnerHTML={{ __html: '' }} />;
};

0 comments on commit 99ce1bc

Please sign in to comment.