diff --git a/docs/rules/jsx-filename-extension.md b/docs/rules/jsx-filename-extension.md index a5866e6ab6..8c234b0908 100644 --- a/docs/rules/jsx-filename-extension.md +++ b/docs/rules/jsx-filename-extension.md @@ -22,11 +22,11 @@ function MyComponent() { ## Rule Options -The set of allowed extensions is configurable. By default '.jsx' is allowed. If you wanted to allow both '.jsx' and '.js', the configuration would be: +The set of allowed extensions is configurable. By default '.jsx' and '.tsx' are allowed. If you wanted to allow '.js' and '.ts' alongside the defaults, the configuration would be: ```js "rules": { - "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx"] }] + "react/jsx-filename-extension": [1, { "extensions": [".js", ".jsx", ".ts", ".tsx"] }] } ``` diff --git a/lib/rules/jsx-filename-extension.js b/lib/rules/jsx-filename-extension.js index 7e7a7c1439..1df1de4e6c 100644 --- a/lib/rules/jsx-filename-extension.js +++ b/lib/rules/jsx-filename-extension.js @@ -12,7 +12,7 @@ const docsUrl = require('../util/docsUrl'); // ------------------------------------------------------------------------------ const DEFAULTS = { - extensions: ['.jsx'] + extensions: ['.jsx', '.tsx'] }; // ------------------------------------------------------------------------------