All Projects → textlint-rule → textlint-rule-eslint

textlint-rule / textlint-rule-eslint

Licence: MIT License
textlint rule integrate with ESLint.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to textlint-rule-eslint

textlint-rule-no-synonyms
同義語を表記ゆれをチェックするtextlintルール
Stars: ✭ 18 (+50%)
Mutual labels:  textlint, textlintrule
textlint-rule-ja-no-abusage
よくある日本語の誤用をチェックするtextlintルール
Stars: ✭ 21 (+75%)
Mutual labels:  textlint, textlintrule
generator-nude
A generator to scaffolding HTTP API's, with Express.js and es6
Stars: ✭ 16 (+33.33%)
Mutual labels:  eslint
presetter
🛹 Reuse and manage build scripts, devDependencies and config files from your favourite presets, instead of copy and paste!
Stars: ✭ 61 (+408.33%)
Mutual labels:  eslint
vite-plugin-checker
💬 Vite plugin that provide checks of TypeScript, ESLint, vue-tsc, and more.
Stars: ✭ 338 (+2716.67%)
Mutual labels:  eslint
eslint-plugin-expect-type
ESLint plugin with $ExpectType, $ExpectError, and $ExpectTypeSnapshot type assertions
Stars: ✭ 27 (+125%)
Mutual labels:  eslint
tutorial-crud-mean
Repositório responsável pelo tutorial realizado no canal do youtube
Stars: ✭ 41 (+241.67%)
Mutual labels:  eslint
eslint-plugin-lodash-template
ESLint plugin for John Resig-style micro template, Lodash's template, Underscore's template and EJS.
Stars: ✭ 15 (+25%)
Mutual labels:  eslint
eslint-plugin-sql
SQL linting rules for ESLint.
Stars: ✭ 56 (+366.67%)
Mutual labels:  eslint
gulp-webpack-boilerplate
A good foundation for your next frontend project.
Stars: ✭ 56 (+366.67%)
Mutual labels:  eslint
react16-seed-with-apollo-graphql-scss-router4-ssr-tests-eslint-prettier-docker-webpack3-hot
Seed to create your own project using React with Apollo GraphQL client
Stars: ✭ 19 (+58.33%)
Mutual labels:  eslint
eslint-plugin
😎 基于 @lint-md,提供 eslint-plugin,让 lint-md 玩家在 IDE 中得到愉悦的文档编写体验。
Stars: ✭ 22 (+83.33%)
Mutual labels:  eslint
eslint-config-adjunct
A reasonable collection of plugins to use alongside your main esLint configuration
Stars: ✭ 39 (+225%)
Mutual labels:  eslint
nextjs-baseweb
Slightly opinionated scaffold of Next.js and Base Web.
Stars: ✭ 46 (+283.33%)
Mutual labels:  eslint
React-Redux-Saga-Advanced-Starter
Boilerplate for Advanced usage with React, Redux, React-Router-Redux, Redux-Saga, Immutable, Reselect, Recompose, Axios, HMR, Babel v7, Jest, Eslint, and more
Stars: ✭ 66 (+450%)
Mutual labels:  eslint
eslint-config
Fullstacks eslint config
Stars: ✭ 22 (+83.33%)
Mutual labels:  eslint
webpack-gulp-wordpress-starter-theme
A WordPress theme with Webpack & Gulp
Stars: ✭ 110 (+816.67%)
Mutual labels:  eslint
2life-server
💌 双生:遇见另一半的美好:)(服务端)
Stars: ✭ 66 (+450%)
Mutual labels:  eslint
Webpack-Starter-Kit
Webpack 4 stater kit with SCSS, PostCSS, Babel & ESLint
Stars: ✭ 41 (+241.67%)
Mutual labels:  eslint
xd-plugin-boilerplate
A boilerplate for plugins for Adobe XD CC including preconfigured linting, autocompletion and Webpack for bundling
Stars: ✭ 25 (+108.33%)
Mutual labels:  eslint

textlint-rule-eslint Actions Status: test

textlint rule to lint JavaScript in Markdown with ESLint.

Use case

ESLint can lint Markdown files using eslint-plugin-markdown. But eslint-plugin-markdown doesn't support disabling Markdown (HTML) comments for ignoring some CodeBlocks.

textlint can filter some CodeBlocks using textlint-filter-rule-comments:

<!-- textlint-disable -->

```js
var ignore = "This is ignored"
```

<!-- textlint-enable -->

Sometimes, we want to write broken JavaScript code into a JS CodeBlock for syntax highlight:

This is error example of parsing:

<!-- textlint-disable eslint -->

```js
// This is invalid example
const const;
```

<!-- textlint-enable eslint -->

To ignore ESLint parsing errors that cannot be ignored from the config file, you can use ignoreParsingErrors:

{
    "rules": {
        "eslint": {
          "configFile": "path/to/.eslintrc"
          "ignoreParsingErrors": true
        }
    }
}

Installation

Install with npm:

npm install textlint-rule-eslint eslint

⚠️ textlint-rule-eslint 4+ requires eslint 8+.

Usage

Via .textlintrc (recommended):

{
    "rules": {
        "eslint": {
          // Required: path to .eslintrc file
          "configFile": "path/to/.eslintrc"
        }
    }
}

Via CLI:

textlint --rule eslint README.md

Options

  • configFile: string
    • Required
    • path to .eslintrc file
  • langs: string[]
    • Default: ["js", "javascript", "node", "jsx"]
    • recognize lang of CodeBlock
  • ignoreParsingErrors: Boolean
    • Default: false
    • ignore ESLint parsing errors while still reporting other ESLint errors
{
    "rules": {
        "eslint": {
            // Required: path to .eslintrc file
            "configFile": "path/to/.eslintrc",
            // recognize lang of CodeBlock
            "langs": ["js", "javascript", "node", "jsx"]
            // Ignore ESLint parsing errors
            "ignoreParsingErrors": true
        }
    }
}

Fixable

textlint-rule-eslint support --fix option.

textlint rule

See https://github.com/textlint/textlint/#fixable for more details.

Changelog

See Releases page.

Running tests

Install devDependencies and Run npm test:

npm i -d && npm test

Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, please create an issue.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

License

MIT © azu

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].