Coder Social home page Coder Social logo

mdx-js / eslint-mdx Goto Github PK

View Code? Open in Web Editor NEW
254.0 8.0 29.0 8.11 MB

ESLint Parser/Plugin for MDX

Home Page: https://npmjs.org/eslint-plugin-mdx

License: MIT License

JavaScript 1.39% TypeScript 98.61%
eslint eslint-parser eslint-plugin mdx eslint-plugin-mdx eslint-mdx

eslint-mdx's Introduction

GitHub Actions Codecov type-coverage GitHub release

Renovate enabled Conventional Commits code style: prettier changesets

ESLint Parser/Plugin for MDX, helps you lint all ES syntaxes. Linting code blocks can be enabled with mdx/code-blocks setting too! Work perfectly with eslint-plugin-import, eslint-plugin-prettier or any other eslint plugins. And also can be integrated with remark-lint plugins to lint markdown syntaxes.

TOC

VSCode Extension

Visual Studio Marketplace Version

VSCode MDX: Integrates with VSCode ESLint, syntaxes highlighting and error reporting.

Packages

This repository is a monorepo managed by changesets what means we actually publish several packages to npm from same codebase, including:

Package Description Version
eslint-mdx ESLint Parser for MDX npm
eslint-plugin-mdx ESLint Plugin, Configuration and Rules for MDX npm

Install

# yarn
yarn add -D eslint-plugin-mdx

# npm
npm i -D eslint-plugin-mdx

Notice

If you're using multi languages, js/jsx/ts/tsx/vue, etc for example, you'd better to always use overrides feature of ESLint, because configs may be overridden by following configs.

See #251 for more details.

Usage

Classic

.eslintrc file:

{
  "extends": ["plugin:mdx/recommended"],
  // optional, if you want to lint code blocks at the same time
  "settings": {
    "mdx/code-blocks": true,
    // optional, if you want to disable language mapper, set it to `false`
    // if you want to override the default language mapper inside, you can provide your own
    "mdx/language-mapper": {}
  }
}

Flat Config

eslint.config.js file:

import * as mdx from 'eslint-plugin-mdx'

export default [
  {
    ...mdx.flat,
    // optional, if you want to lint code blocks at the same
    processor: mdx.createRemarkProcessor({
      lintCodeBlocks: true,
      // optional, if you want to disable language mapper, set it to `false`
      // if you want to override the default language mapper inside, you can provide your own
      languageMapper: {},
    }),
  },
  {
    ...mdx.flatCodeBlocks,
    rules: {
      ...mdx.flatCodeBlocks.rules,
      // if you want to override some rules for code blocks
      'no-var': 'error',
      'prefer-const': 'error',
    },
  },
]

Then, make sure ESLint knows to run on .md or .mdx files:

eslint . --ext js,md,mdx

Parser Options

  1. extensions (string | string[]): eslint-mdx will only resolve .mdx files by default, if you want to resolve other extensions as like .mdx, you can use this option.

  2. markdownExtensions (string | string[]): eslint-mdx will only treat .md files as plain markdown by default, and will lint them via remark plugins. If you want to resolve other extensions as like .md, you can use this option.

  3. ignoreRemarkConfig (boolean): Ignore the remark configuration defined in the project.

Parser API

MDXCode

A new MDXCode estree node type is exported from eslint-mdx which represents code blocks in mdx like the following:

<div>
  ```js
  export function foo() {
    return 'bar'
  }
  ```
</div>

See also https://github.com/syntax-tree/mdast#code

MDXHeading

A new MDXHeading estree node type is exported from eslint-mdx which represents markdown heading in mdx like the following:

<div>
# Here's a text gradient short code!
</div>

See also https://github.com/syntax-tree/mdast#heading

Typings

import type { BaseNode } from 'estree'
import type { JSXElement } from 'estree-jsx'

export interface MDXCode extends BaseNode {
  type: 'MDXCode'
  value: string
  lang?: string | null
  meta?: string | null
}

export type HeadingDepth = 1 | 2 | 3 | 4 | 5 | 6

export interface MDXHeading extends BaseNode {
  type: 'MDXHeading'
  depth: HeadingDepth
  children: JSXElement['children']
}

Rules

mdx/remark

possible fixable depends on your remark plugins:

Integration with remark-lint plugins, it will read remark's configuration automatically via unified-engine. But .remarkignore will not be respected, you should use .eslintignore instead.

If you want to disable or change severity of some related rules, it won't work by setting rules in eslint config like 'remark-lint-no-duplicate-headings': 0, you should change your remark config instead like following:

{
  "plugins": [
    "@1stg/remark-config",
    // change to error severity, notice `[]` is required
    ["lint-no-duplicate-headings", [2]],
    // disable following plugin
    [
      "lint-no-multiple-toplevel-headings",
      [0] // or false
    ]
  ]
}

Prettier Integration

If you're using remark-lint feature with Prettier both together, you can try remark-preset-prettier which helps you to turn off all rules that are unnecessary or might conflict with Prettier.

{
  "plugins": [
    "preset-lint-consistent",
    "preset-lint-recommended",
    "preset-lint-markdown-style-guide",
    "preset-prettier"
  ]
}

Sponsors

1stG RxTS UnTS
1stG Open Collective backers and sponsors RxTS Open Collective backers and sponsors UnTS Open Collective backers and sponsors

unified Open Collective backers and sponsors

Backers

Backers

1stG RxTS UnTS
1stG Open Collective backers and sponsors RxTS Open Collective backers and sponsors UnTS Open Collective backers and sponsors

unified Open Collective backers and sponsors

Changelog

Detailed changes for each release are documented in CHANGELOG.md.

License

MIT © JounQin@1stG.me

eslint-mdx's People

Contributors

chenxsan avatar dimamachina avatar edisonsu768 avatar ethanshoedev avatar github-actions[bot] avatar gyanta avatar jablko avatar jjoselv avatar jounqin avatar lucasvazq avatar nd0ut avatar renovate-bot avatar renovate[bot] avatar wooorm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eslint-mdx's Issues

Support async processing

Subject of the issue

eslint-mdx uses .processSync instead of .process, causing async plugins to fail.

Error: `processSync` finished async. Use `process` instead
Occurred while linting /Users/tilde/Code/oss/mdx/packages/remark-mdx/readme.md:1
    at assertDone (/Users/tilde/Code/oss/mdx/node_modules/unified/index.js:469:11)
    at Function.processSync (/Users/tilde/Code/oss/mdx/node_modules/unified/index.js:401:5)
    at Program (/Users/tilde/Code/oss/mdx/node_modules/eslint-plugin-mdx/lib/cjs.js:361:44)
    at /Users/tilde/Code/oss/mdx/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/Users/tilde/Code/oss/mdx/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/Users/tilde/Code/oss/mdx/node_modules/eslint/lib/linter/node-event-generator.js:254:26)
    at NodeEventGenerator.applySelectors (/Users/tilde/Code/oss/mdx/node_modules/eslint/lib/linter/node-event-generator.js:283:22)
    at NodeEventGenerator.enterNode (/Users/tilde/Code/oss/mdx/node_modules/eslint/lib/linter/node-event-generator.js:297:14)
    at CodePathAnalyzer.enterNode (/Users/tilde/Code/oss/mdx/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:634:23)

Your environment

  • OS: osx latest
  • Packages:
  • Env: node 13.10, 6.14, yarn 1.22

Steps to reproduce

yarn format in mdx-js/mdx (with changes on a branch)

Expected behaviour

Support async plugins:

const file = remarkProcessor.processSync(

Actual behaviour

Crash.


P.S. aside: you may be interested in vfile-to-eslint

.vue files cause parsing error after enabling plugin:mdx/recommended

Subject of the issue

After enabling "plugin:mdx/recommended" extension in .eslintrc.js, .vue files of a Vue project suddenly start incorrectly reporting syntax error during eslint --ext .js,.ts,.vue,.mdx --ignore-path .gitignore ., even though this extension shouldn't affect .vue files at all (at least I wasn't able to find anything similar in provided documentations after hours of searching).

/sandbox/components/IconLink.vue
  22:8  error  Parsing error: '}' expected

/sandbox/components/Logo.vue
  3:4  error  Parsing error: Identifier expected

/sandbox/layouts/default.vue
  9:13  error  Parsing error: '}' expected

/sandbox/pages/about.vue
  15:14  error  Parsing error: '}' expected

/sandbox/pages/index.vue
  4:12  error  Parsing error: Identifier expected

✖ 5 problems (5 errors, 0 warnings)

Your environment

  • OS: Windows 10, reproducible in codesandbox environment
  • Packages:
"devDependencies": {
    "@nuxt/typescript-build": "^2.0.3",
    "@nuxtjs/eslint-config-typescript": "^5.0.0",
    "@nuxtjs/eslint-module": "^3.0.1",
    "eslint": "^7.14.0",
    "eslint-config-prettier": "^6.15.0",
    "eslint-plugin-mdx": "^1.8.2",
    "eslint-plugin-nuxt": "^2.0.0",
    "eslint-plugin-prettier": "^3.1.4",
    "prettier": "^2.2.1"
  }
  • Env: yarn --version is 1.22.4

Steps to reproduce

  1. Open https://codesandbox.io/s/modest-bird-4p917?file=/.eslintrc.js
    -> A sample Nuxt project with minor modifications and additional (eslint) dependencies
  2. Run yarn lint in a new terminal

Expected behaviour

Documentation of this library claims that it only affects .mdx files, so there should be no new sudden errors.

  • (Unrelated note: is there any chance you could provide a recommended setup example for Nuxt projects that use storybook module, to let new users benefit from immediate compatibility with zero-configuration project and pre-configured TS/eslint/prettier or even remark-lint? A working example would immensely help us with debugging; plus it'd be also nice if you had a CI test that lints a sample project, so that we could send a repro PR and have GitHub Actions execute it.)

Actual behaviour

The valid .vue files fail on lint. If you remove "plugin:mdx/recommended" from .eslintrc.js and try again, this time there's no error.

`eslint-plugin-mdx` won't work along with `eslint-plugin-markdown`

Subject of the issue

I have eslint-plugin-markdown enabled in this project with processor option enabled:

    {
      files: ['**/*.mdx'],
      processor: 'markdown/markdown',
    },

Now when I enable eslint-plugin-mdx:

    {
      files: ['**/*.mdx'],
      processor: 'markdown/markdown',
      extends: ['plugin:mdx/recommended'],
    },

eslint won't report any errors.

Only when I remove processor will `eslint report the lint problems:

image

Your environment

  • OS:
  • Packages:
  • Env:

Steps to reproduce

  1. clone code from https://github.com/webpack/webpack.js.org/pull/4326
  2. run yarn
  3. run yarn lint:js

Expected behaviour

eslint-plugin-mdx should work fine along with eslint-plugin-markdown.

Actual behaviour

Parsing error when a component is used within a markdown list

Subject of the issue

The following code:

- <LinkTo kind="docs-packages-vuetify-preset" story="page">
    Vuetify preset
  </LinkTo>
  : some extra text describing the preset

Trigger an error on line 3:

  </LinkTo>
    ^^^^^^
    Parsing error: '>' expected.

Adding an empty line between the last two lines fixes the issue, but the rendered output is not the same. Also putting it all in a single line works, but it’s not "Prettier compliant" and gets reformatted on multiple lines. If the same code is placed at the root (not within a markdown list), it works as well.

It does pretty much the same with a regular element instead of a component, but the error is different:

Parsing error: Identifier expected

Note that the code compiles properly, the problem is only at EsLint level.

Your environment

  • OS: macOS 10.15.7
  • Packages: eslint-plugin-mdx 1.9.0
  • Env: Node 14.16.0, npm 6.14.11

Question&Bug: Does not work well with preset styles

Not Working with Preset Styles

when initiates eslint with one of the preset styles: google, standard or airbnb, eslint-mdx seems to conflict with the preset style.

Your environment

  • OS: CentOS
  • Env: node 10.19.0, yarn 1.22.4 eslint 6.8.0

Steps to reproduce:

  1. create a react app with create-react-app
yarn create react-app app
  1. init eslint in the app folder
cd app
npx eslint --init
  1. add mdx plugin
yarn add -D eslint-plugin-mdx

choose one of Standard, Airbnb, Google style during initiation process.
4. add mdx to config

{
  "extends": [
    "plugin:mdx/recommended"
  ]
}

Now create a valid mdx file with import and jsx syntax and run eslint on the file.

Some weird errors are reported. It seems like something other than eslint-mdx is linting the mdx file.

Expected behaviour

no error is reported as the mdx is valid.

Actual behaviour

some weird errors are reported. The error reported is different for different preset style. Just to give an example, when the Airbnb style is chosen, 5:1 error JSX not allowed in files with extension '.mdx' is reported.

Note

When the style part in the config file is removed,

{
  "extends": [
    "airbnb"
  ]
}

The problem disappeared. Therefore I guess that it's the conflict between the preset style and eslint-mdx that causes the problem.

This must be a very common scenario as all the steps follow the recommendation of eslint and eslint-mdx. But I cannot find a similar question on Google or StackOverflow. This might be helpful to others encountering the very problem in the future.

`Parsing error: unknown jsx node` when newlines are between nested jsx nodes

Subject of the issue

When newlines exist between 2 nested jsx nodes, linting of the file fails with Parsing error: unknown jsx node.

Your environment

Steps to reproduce

codesandbox

Error

<div>
  <p>test</p> 

  <p>test</p>
</div>

No Error

<div>
  <p>test</p> 
  <p>test</p>
</div>

Expected behaviour

This should pass lint without error

Actual behaviour

Lint fails with error

feature: add eslint-plugin-remark package

Current implementation in eslint-plugin-mdx can actually be used for all remark related plugins.

Focus on markdown for now.

Maybe rename repository to eslint-remark.

Split into monorepos

Split package to eslint-mdx as the parser and @rxts/eslint-plugin-mdx as the plain plugin by using monorepos, rename the repository name to be eslint-mdx.

Invalid character for md syntax

Issue

In mdx file I have a mix of HTML and markdown. eslint-plugin-mdx is not recognizing md syntax.

Screen Shot 2020-08-31 at 2 20 31 PM

After remove markdown code works

Screen Shot 2020-08-31 at 2 25 09 PM

Your environment

  • OS: Mac OS 10.15.5
  • Packages: eslint: 7.7.0 - eslint-plugin-mdx: 1.8.2 - typescript: 4.0.2
  • Env: npm

.eslintrc

{
  "env": {
    "browser": true,
    "jest/globals": true
  },
  "settings": {
    "react": {
      "version": "detect"
    }
  },
  "parser": "@typescript-eslint/parser",
  "extends": [
    "standard",
    "eslint:recommended",
    "plugin:jest/recommended",
    "plugin:react-hooks/recommended",
    "plugin:@typescript-eslint/recommended",
    "plugin:react/recommended",
    "prettier",
    "prettier/react",
    "prettier/@typescript-eslint",
    "prettier/standard",
    "plugin:mdx/recommended"
  ],
  "plugins": ["@typescript-eslint", "react", "react-hooks", "standard", "jest"]
}

Parsing error: Unterminated regular expression literal.

Hey,

first of all thanks for building this. I really appreciate the work you put into this project.

I'm running into a problem with linting MDX files alongside react and typescript. I have a working setup for all of the react parts, but whatever i try, i am not able to get .mdx linting to work.

The linter shows 'Parsing error: Unterminated regular expression literal.' on jsx in MDX files.

<div>Lorem</div>
-----------^----

I made a small test case here:
https://github.com/tizzle/mdx-lint-bug

Do you have any idea what could be going on and can point me towards a solution? That would be great.

Best

Can't disable a rule with mdx-js/eslint-mdx and remake-lint

Can't disable remake-lint rules while using it with mdx-js/eslint-mdx (on a .md file). Tried:

<!--lint disable no-duplicate-headings-->
// eslint-disable-next-line mdx/remark
/ eslint-disable mdx/remark /

I can disable mdx rules in .mdx files just fine, but it doesn't work for .md ones.

Also, seems pretty bad to have to reload my vscode to update disabled rules from .remarkrc file. Is there any better way to use these rules with eslint?

package.json

"eslint": "v7.0.0",
"eslint-plugin-mdx": "^1.6.9",
"remark-preset-lint-consistent": "^3.0.0",
"remark-preset-lint-markdown-style-guide": "^3.0.0",
"remark-preset-lint-recommended": "^4.0.0",
"remark-preset-prettier": "^0.4.0",

.eslintrc

"overrides": [
  {
    "files": "**/*.+(md|mdx)",
    "extends": ["plugin:mdx/recommended"]
   }
]

.remarkrc

module.exports = {
  plugins: [
    'preset-lint-consistent',
    'preset-lint-markdown-style-guide',
    'preset-lint-recommended',
    'preset-prettier'
  ]
}

`mdx/no-unescaped-entities` usage issue

// not work
<div style={{ color: 'white', backgroundColor: 'black', padding: '24px 32px' }}>

<a
  style={{
    color: 'white',
    textDecoration: 'none',
    fontWeight: 'bold',
    fontSize: 32
  }}
  href="https://blacklivesmatters.carrd.co/"
>
  #BlackLivesMatter &rarr;
</a>

</div>

// work
<div style={{ color: 'white', backgroundColor: 'black', padding: '24px 32px' }}>
<a
  style={{
    color: 'white',
    textDecoration: 'none',
    fontWeight: 'bold',
    fontSize: 32
  }}
  href="https://blacklivesmatters.carrd.co/"
>
  #BlackLivesMatter &rarr;
</a>
</div>

mdx/no-unused-expressions Error when using safe optional operator "?"

#####Getting an eslint error when using safe optional operator in my typescript files.

Subject of the issue

I use eslint-mdx to lint my mdx stories. In my typescript project i use safe optional operator and i get Expected an assignment or function call and instead saw an expression. (mdx/no-unused-expressions) error from the eslint mdx plugin. Only workaround i have found is to disable the rule for all ts/tsx files.

Expected behaviour

It should not show an error

list "eslint-plugin-react" as a peer dependency

Subject of the feature

When creating lint configs, many people will already install eslint-plugin-react. By listing the package as a devDependency and peerDependency, the consumer controls the version of the package.

Problem

The conflicting versions yield warnings during install and cause confusion as to which version of plugin is being adhered to during linting.

Expected behavior

What should happen? Please describe the desired behavior.

Alternatives

Always install the latest version and let people use resolutions if they need to pin it lower.

Support Frontmatter

Subject of the feature

I'm currently creating a new eslint setup in my project and everything seems fine but when I lint .mdx files I'm getting the below warning. I couldn't find anything in the docs or if it is even already supported but frontmatter support is necessary.

.../src/pages/about.mdx
  1:3  error  Parsing error: Invalid left-hand side in prefix operation

> 1 | ---
    |   ^
  2 | title: 'About Me'
  3 | ---
  4 |

Problem

No frontmatter support

Expected behavior

Should ignore the frontmatter section or lint it if it is possible (indention etc.)

Alternatives

What are the alternative solutions? Please describe what else you have considered?

Additional information

My eslint config:

{
  "parser": "babel-eslint",
  "plugins": [
    "import"
  ],
  "extends": [
    "eslint:recommended",
    "plugin:import/errors",
    "plugin:import/warnings",
    "plugin:react/recommended",
    "plugin:mdx/recommended",
    "plugin:jsx-a11y/strict",
    "plugin:prettier/recommended"
  ],
  "env": {
    "es6": true,
    "browser": true,
    "commonjs": true,
    "serviceworker": true
  },
  "parserOptions": {
    "sourceType": "module",
    "ecmaVersion": 2020
  },
  "settings": {
    "react": {
      "version": "detect"
    },
    "import/resolver": {
      "node": {
        "extensions": [
          ".js",
          ".jsx"
        ]
      }
    }
  },
  "rules": {
    "react/display-name": "off",
    "react/prop-types": "off",
    "import/order": [
      "error",
      {
        "groups": [
          [
            "builtin",
            "external",
            "internal"
          ]
        ]
      }
    ],
    "default-case": "off"
  }

eslint-plugin-mdx uses dependency cosmiconfig that uses for async, not supported until node 10

Subject of the issue

Describe your issue here.

eslint-plugin-mdx uses dependency cosmiconfig that uses for async, not supported until node 10: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of

/var/lib/jenkins/workspace/#####/node_modules/eslint-plugin-mdx/node_modules/cosmiconfig/dist/Explorer.js:54
    for await (const place of this.config.searchPlaces) {
        ^^^^^

SyntaxError: Unexpected reserved word
    at NativeCompileCache._moduleCompile (/var/lib/jenkins/workspace/#####/node_modules/v8-compile-cache/v8-compile-cache.js:242:18)
    at Module._compile (/var/lib/jenkins/workspace/#####/node_modules/v8-compile-cache/v8-compile-cache.js:186:36)
    at Object.Module._extensions..js (module.js:663:10)
    at Module.load (module.js:565:32)
    at tryModuleLoad (module.js:505:12)
    at Function.Module._load (module.js:497:3)
    at Module.require (module.js:596:17)
    at require (/var/lib/jenkins/workspace/#####/node_modules/v8-compile-cache/v8-compile-cache.js:161:20)
    at Object.<anonymous> (/var/lib/jenkins/workspace/#####/node_modules/eslint-plugin-mdx/node_modules/cosmiconfig/dist/index.js:12:17)
    at Module._compile (/var/lib/jenkins/workspace/#####/node_modules/v8-compile-cache/v8-compile-cache.js:194:30)

Your environment

  • OS: windows
  • Packages: eslint-plugin-mdx": "^1.8.2"
  • Env: node: v8.11.3, npm 6.1.0

Steps to reproduce

Fails on linting mdx files: (npm run lint)

Actual behaviour

Doesn't fail

Expected behaviour

The package.json for eslint-plugin-mdx is:
´´´
"engines": {
"node": ">=7.0.0"
},
´´´

Because of this, it may needed to, either upgrade to >10 or resolve the dependency node requirements for cosmiconfig

Parsing error: unexpected closing tag with style

Subject of the issue

Adding style={{}} seems to break parsing of closing tags.

error  Parsing error: Unexpected closing tag "Button". It may happen when the tag has already been closed by another tag. For more info see https://www.w3.org/TR/html5/syntax.html#closing-elements-that-have-implied-end-tags

Your environment

  • OS: macOS 10.15.2
  • Packages:
    "@typescript-eslint/eslint-plugin": "^2.17.0",
    "@typescript-eslint/parser": "^2.17.0",
    "eslint": "^6.8.0",
    "eslint-config-prettier": "^6.9.0",
    "eslint-config-react-app": "^5.1.0",
    "eslint-plugin-flowtype": "^4.6.0",
    "eslint-plugin-graphql": "^3.1.1",
    "eslint-plugin-import": "^2.20.0",
    "eslint-plugin-jsx-a11y": "^6.2.3",
    "eslint-plugin-mdx": "^1.6.5",
    "eslint-plugin-prettier": "^3.1.2",
    "eslint-plugin-react": "^7.18.0",
    "eslint-plugin-react-hooks": "^2.3.0",
  • Env: yarn 1.21.1

Steps to reproduce

---
title: Contact
---

import { Button } from '@rmwc/button';

# Contact

<Button
  raised
  style={{ margin: '8px' }}
>
  Message Me
</Button>

Expected behaviour

The parser should be able to style on a JSX tag.

Actual behaviour

The parser throws an error.

break on inline jsx

Sentence Start <button>This is a <a>
Link</a>button
</button> Sentence
End here...

We need combine inline jsx nodes.

[feature] add support for linting code blocks

We can already get code blocks in eslint-mdx, so it should be possible to lint them by eslint-plugin-mdx itself.

A setting named lintCodeBlocks: boolean should be required.

Additional, we can reference eslint-plugin-markdown's codes.

Linting not working for typescript project - The extension for the file (.mdx) is non-standard. You should add "parserOptions.extraFileExtensions" to your config

I'm trying to lint *.mdx file in Next.js typescript project but getting below error.

Command I run:

eslint ./pages/** --ext .mdx -c ./.eslintrc.json

Error I get:

0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
The file does not match your project config: pages\blog\setup-vscode\index.mdx.
The extension for the file (.mdx) is non-standard. You should add "parserOptions.extraFileExtensions" to your config

.eslintrc.json

{
  "root": true,
  "env": {
    "browser": true,
    "es2020": true,
    "node": true
  },
  "parser": "@typescript-eslint/parser",

  "plugins": [
    "react",
    "@typescript-eslint",
    "react-hooks",
    "promise",
    "jsx-a11y"
  ],

  "extends": [
    "plugin:@typescript-eslint/recommended",
    "plugin:@typescript-eslint/recommended-requiring-type-checking",
    "airbnb-typescript",
    "airbnb/hooks",
    "plugin:mdx/recommended",
    "plugin:promise/recommended",
    "plugin:react/recommended",
    "plugin:import/warnings",
    "plugin:import/errors",
    "plugin:jsx-a11y/recommended",
    "prettier",
    "prettier/@typescript-eslint",
    "prettier/react"
  ],
  "settings": {
    "react": {
      "version": "detect"
    }
  },
  "parserOptions": {
    "project": "./tsconfig.json",
    "ecmaFeatures": {
      "jsx": true
    },
    "ecmaVersion": 12,
    "sourceType": "module",
    "extraFileExtensions:": [".mdx"],
    "extensions:": [".mdx"]
  }
}

tsconfig.json

{
  "compilerOptions": {
    "target": "es5",
    "lib": ["dom", "dom.iterable", "esnext"],
    "allowJs": true,
    "skipLibCheck": true,
    "strict": true, // can set to false
    "forceConsistentCasingInFileNames": true,
    "noEmit": true,
    "esModuleInterop": true,
    "module": "esnext",
    "moduleResolution": "node",
    "resolveJsonModule": true,
    "isolatedModules": true,
    "jsx": "preserve",
    // additional flags
    "noImplicitAny": true, //disable use of 'any'
    "suppressImplicitAnyIndexErrors": true,
    "pretty": true,
    "noImplicitReturns": true,
    "strictNullChecks": false,
    "noUnusedLocals": false,
    "noUnusedParameters": false
  },
  "include": [
    "next-env.d.ts",
    "**/*.ts",
    "**/*.tsx",
    "**/*.config.js" /* .config.js files */
  ],
  "exclude": ["node_modules"]
}

Plugins versions:

  "@typescript-eslint/eslint-plugin": "^4.9.1",
    "@typescript-eslint/parser": "^4.9.1",
"eslint": "^7.15.0",
    "eslint-config-airbnb": "^18.2.1",
    "eslint-config-airbnb-typescript": "^12.0.0",
    "eslint-config-prettier": "^7.0.0",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-jsx-a11y": "^6.4.1",
    "eslint-plugin-mdx": "^1.8.2",
    "eslint-plugin-promise": "^4.2.1",
    "eslint-plugin-react": "^7.21.5",
    "eslint-plugin-react-hooks": "^4.2.0",

Do let me know if you need further details.

Support for MDX v2

Thanks for the amazing package @JounQin!

For v2 it looks like we'll need to change a few things with this package, it's currently silently failing when run in the next branch of mdx-js/mdx. Will you have any time in the next month or so to ensure compatibility?

~/c/mdx next ⇡
❯ yarn lint
yarn run v1.17.3
$ eslint . --cache --ext js,jsx,md,mdx -f friendly

Oops! Something went wrong! :(

ESLint: 7.0.0


error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

~/c/mdx next 6s

Add contributing guidelines

Subject of the feature

This project has the MDX defaults for support, contributing, issue/pr templates, etc, but some project-specific ways to contribute (e.g., how to publish) are unclear to me.

Problem

I’m unsure what the procedure is to publish a release.

Expected behavior

Documentation on which scripts to run, what to do, etc.

Frontmatter in Markdown and MDX causes parsing error

Subject of the issue

Linting Markdown and MDX files with eslint-mdx results in Parsing error: Invalid left-hand side in prefix operation error

Your environment

  • OS: MacOS Catalina
  • Packages: Refer package.json in example repo
  • Env: Node 12.18.3, Yarn 1.22.4

Steps to reproduce

  1. Clone example repository from https://github.com/madcatsu/eslint-mdx-frontmatter-issue.git
  2. yarn install
  3. yarn run lint

Expected behaviour

Frontmatter in sample Markdown and MDX files should parse without error

Actual behaviour

Eslint outputs Parsing error: Invalid left-hand side in prefix operation

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: package.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid configuration option: author, Invalid configuration option: commitlint, Invalid configuration option: eslintIgnore, Invalid configuration option: jest, Invalid configuration option: license, Invalid configuration option: name, Invalid configuration option: packageRules[0].@1stg/lib-config, Invalid configuration option: packageRules[0].@1stg/tslint-config, Invalid configuration option: packageRules[0].@types/eslint, Invalid configuration option: packageRules[0].@types/eslint-plugin-markdown, Invalid configuration option: packageRules[0].@types/jest, Invalid configuration option: packageRules[0].@types/node, Invalid configuration option: packageRules[0].@types/react, Invalid configuration option: packageRules[0].@types/unist, Invalid configuration option: packageRules[0].lerna, Invalid configuration option: packageRules[0].npm-run-all, Invalid configuration option: packageRules[0].react, Invalid configuration option: packageRules[0].remark-validate-links, Invalid configuration option: packageRules[0].ts-jest, Invalid configuration option: packageRules[0].ts-node, Invalid configuration option: packageRules[0].tslint, Invalid configuration option: packageRules[0].type-coverage, Invalid configuration option: packageRules[0].typescript, Invalid configuration option: packageRules[0].yarn-deduplicate, Invalid configuration option: prettier, Invalid configuration option: private, Invalid configuration option: remarkConfig, Invalid configuration option: renovate, Invalid configuration option: resolutions, Invalid configuration option: scripts, Invalid configuration option: typeCoverage, Invalid configuration option: version, Invalid configuration option: workspaces

eslint-plugin-mdx triggering mdx/no-unescaped-entities inside JSX

Saw the

Need help?
Please ask on Spectrum

and

This is not a place to ask questions. For that, go to [Spectrum]> >
(https://spectrum.chat/mdx)

So asked there first.

Subject of the issue

eslint-plugin-mdx triggering mdx/no-unescaped-entities inside JSX
Code_7IO2sDBmqf

Your environment

  • OS: Windows 10 using WSL2 Ubuntu Bionic Beaver
  • Packages: eslint-plugin-mdx
  • Env: node 12, yarn 1.17

Steps to reproduce

Clone and run yarn: https://github.com/NickyMeuleman/gatsby-theme-nicky-blog.git
Look at any React component in .mdx that passes a prop with a string value.
Example <YouTube youTubeId="dQw4w9WgXcQ" />
https://github.com/NickyMeuleman/gatsby-theme-nicky-blog/blob/master/demo/data/posts/i-want-it-all/index.mdx#L27

Expected behaviour

No mdx/no-unescaped-entities error for the quotes in <YouTube youTubeId="dQw4w9WgXcQ" />

Actual behaviour

mdx/no-unescaped-entities error

Parsing error: Subsequent lines with self-closing JSX tags

Subject of the issue

Two lines with self-closing JSX tags seem to have issues:

error  Parsing error: unknown jsx node: "<Hero />\n<Featured />"

Your environment

  • OS: macOS 10.15.2
  • Packages:
    "@typescript-eslint/eslint-plugin": "^2.17.0",
    "@typescript-eslint/parser": "^2.17.0",
    "eslint": "^6.8.0",
    "eslint-config-prettier": "^6.9.0",
    "eslint-config-react-app": "^5.1.0",
    "eslint-plugin-flowtype": "^4.6.0",
    "eslint-plugin-graphql": "^3.1.1",
    "eslint-plugin-import": "^2.20.0",
    "eslint-plugin-jsx-a11y": "^6.2.3",
    "eslint-plugin-mdx": "^1.6.5",
    "eslint-plugin-prettier": "^3.1.2",
    "eslint-plugin-react": "^7.18.0",
    "eslint-plugin-react-hooks": "^2.3.0",
  • Env: yarn 1.21.1

Steps to reproduce

import Hero from '../components/hero';
import Featured from '../components/favorites';

<Hero />
<Featured />

Expected behaviour

The parser should be able to handle two separate self-closing JSX tags on subsequent lines.

Actual behaviour

The parser throws an error.

`;` could be part of `jsx` node

<div>hi</div>; is a valid jsx node, but eslint-mdx parses it incorrectly like <div>hi</div> what means ; in jsx node are ignored.

Parse error on YAML headers

Hi, I want to use this plugin for linting my Docz documentation written in MDX, but the plugin seems unable to parse the YAML headers used for configuration.

Example:

---
name: FollowReveal
route: /follow-reveal
---

# FollowReveal
...

Error:

1:3  error  Parsing error: Invalid left-hand side in prefix operation
> 1 | ---
    |   ^
  2 | name: FollowReveal
  3 | route: /follow-reveal
  4 | ---

rebass is installed

Subject of the issue

One thing I noticed is that rebass is an optionalDependencies , so yarn is going to install it whenever possible as per https://classic.yarnpkg.com/en/docs/dependency-types/, and it installs quite a lot of packages https://github.com/webpack/webpack.js.org/pull/4326/files#diff-51e4f558fae534656963876761c95b83b6ef5da5103c4adef6768219ed76c2de.

But I don't use rebass at all, hence it just doesn't make sense.

Steps to reproduce

Just install eslint-plugin-mdx and check yarn.lock for rebass.

Expected behaviour

rebass should not be installed just because I have eslint-plugin-mdx installed.

Actual behaviour

rebass is installed along with eslint-plugin-mdx.

Parsing error: <filename.mdx>: Unexpected token

Subject of the issue

I am receiving this error with a file as simple as this:

`

Menu List

Let's define a story for our TableRowMenu component:
error:
#####/stories/TableRowMenu.stories.mdx
1:0 error Parsing error: #####/TableRowMenu.stories.mdx: Unexpected token (1:0)

1 | # Menu List
| ^
2 |
3 | Let's define a story for our TableRowMenu component:
4 |
`

Additionaly, I cannot manage to set VSCode to read the mdx files

Version of the plugin: v0.2.2

Settings:
"eslint.options": {
"lintFiles": ["./src/", "./stories/"],
"extenstions": [".js", ".jsx", ".md", ".mdx", ".ts", ".tsx"]
},
"eslint.probe": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"html",
"vue",
"markdown",
"mdx"
]

Your environment

  • OS: Mac BigSur
  • Packages: eslint: ^7.13.0, eslint-plugin-mdx: ^1.8.2, @babel/core: ^7.12.3, @babel/parser: ^7.12.5
  • Env: node: v12.18.2, npm: v6.14.5

Steps to reproduce

I launch this command: eslint --config .eslintrc.yml --ext .js,.jsx,.mdx "src/" "stories/"

The .eslintrc.yml:

`

extends:

  • plugin:react/recommended
  • airbnb-base
  • plugin:mdx/recommended
  • plugin:jsx-a11y/recommended
  • plugin:react-hooks/recommended
  • plugin:jest-dom/recommended
    env:
    browser: true
    amd: true
    jquery: true
    es6: true
    node: true
    jest: true

settings:
react:
version: latest

parser: '@babel/eslint-parser'

parserOptions:
ecmaVersion: 6
sourceType: 'module'
ecmaFeatures:
jsx: true
experimentalDecorators: true

globals:
DEV: true
SERVER: true

plugins:

  • react
  • jest
  • jest-dom
    rules:
    max-len:
    [
    1,
    120,
    2,
    {
    ignoreComments: true,
    ignoreUrls: true,
    ignoreRegExpLiterals: true,
    ignoreStrings: true,
    ignoreTemplateLiterals: true,
    },
    ]
    quote-props: [2, 'as-needed']
    radix: 0
    space-infix-ops: 1
    default-case: 0
    no-else-return: 0
    no-param-reassign: 0
    semi: [2, 'always']
    func-names: 0
    object-shorthand: [1, 'always']
    quotes: [2, 'single', { avoidEscape: true, allowTemplateLiterals: true }]
    indent: [2, 2, { SwitchCase: 1 }]
    no-tabs: 0
    no-template-curly-in-string: 0
    no-undef: 2
    eqeqeq: [2, 'smart']
    no-useless-concat: 0
    no-plusplus: 0
    no-empty: 2
    one-var-declaration-per-line: 0
    one-var: 0
    comma-dangle: 0
    prefer-arrow-callback: 1
    eol-last: 1
    no-underscore-dangle: 0
    consistent-return: 0
    no-shadow: 2
    prefer-const: 1
    no-loop-func: 1
    no-continue: 0
    prefer-rest-params: 1
    no-nested-ternary: 1
    no-prototype-builtins: 0
    no-restricted-properties: 0
    no-unused-expressions: [1, { allowTernary: true, allowShortCircuit: true }]
    no-multi-assign: 0
    no-case-declarations: 1
    guard-for-in: 0
    no-restricted-syntax: 0
    strict: 0
    no-mixed-operators: [2, { allowSamePrecedence: false }]
    global-require: 0
    import/no-dynamic-require: 0
    newline-per-chained-call: 0
    spaced-comment: 1
    class-methods-use-this: 0
    no-cond-assign: 2
    no-unused-vars:
    [2, { 'vars': 'local', 'args': 'none', 'ignoreRestSiblings': true }]
    react/prop-types: [2, { 'ignore': ['children'] }]
    curly: 2
    jsx-quotes: [1, 'prefer-single']
    no-constant-condition: 2
    valid-typeof: 2
    no-catch-shadow: 2
    import/no-extraneous-dependencies: 0
    import/first: 0
    import/prefer-default-export: 0
    import/no-webpack-loader-syntax: 0
    import/no-unresolved: 0
    import/extensions: 0
    import/no-duplicates: 0
    import/no-named-as-default: 0
    arrow-parens: 0
    object-curly-newline: 0
    operator-linebreak: 0
    implicit-arrow-linebreak: 0
    function-paren-newline: 0
    space-before-function-paren: 0
    no-warning-comments: [1, { 'terms': ['fixme']}]
    `

Expected behaviour

I think it should not through an error

Actual behaviour

The error happens

Error when parsing two or more comments

Steps to reproduce

Linting of minimal mdx:

<!-- * foo -->
<!-- * bar -->

Expected behaviour

No any errors

Actual behaviour

Results in error:

Parsing error: Cannot read property '2' of null

What causes

The root of the problem is that the COMMENT_CONTENT_REGEX regexp is global and is used twice in different parts of the code with .exec method, that mutates it's lastIndex property.

I'm preparing a pull request to fix it.

Incompatibility with @typescript-eslint

When we use the config @typescript-eslint/recommended-requiring-type-checking from typescript-eslint we have to set parserOptions.project.

It seems that eslint-mdx overwrites the parserOptions.project config because when we run eslint we get this error:

Error: Error while loading rule '@typescript-eslint/no-misused-promises': You have used a rule which requires parserServices to be generated. You must therefore provide a value for the "parserOptions.project" property for @typescript-eslint/parser.

warning `>` can be escaped with `&gt;`

Subject of the issue

Here's the content of a mdx file:

Webpack 5 has been officially released. Read our <a href="/blog/2020-10-10-webpack-5-release/">announcement</a>. Not ready yet? Read <a href="https://v4.webpack.js.org/">webpack 4 documentation here</a>.

And the eslint configuration:

module.exports = {
  root: true,
  extends: ['eslint:recommended', 'plugin:react/recommended', 'prettier'],
  parser: '@babel/eslint-parser',
  env: {
    browser: true,
    es6: true,
    node: true,
    jest: true,
    'cypress/globals': true,
  },
  plugins: ['markdown', 'cypress', 'react-hooks'],
  globals: {
    __DEV__: true,
  },
  rules: {
    'no-console': 'off',
    semi: ['error', 'always'],
    quotes: ['error', 'single'],
    'react/jsx-uses-react': 'off', // no longer needed with new jsx transform
    'react/react-in-jsx-scope': 'off', // ditto
    'react-hooks/rules-of-hooks': 'error',
    'react-hooks/exhaustive-deps': 'warn',
  },
  settings: {
    react: {
      version: 'detect',
    },
  },
  overrides: [
    { files: ['src/**/*.jsx'] }, // eslint would lint .js only by default
    {
      files: ['**/*.mdx'],
      extends: ['plugin:mdx/recommended'],
      globals: {
        Badge: true,
      },
      rules: {
        semi: ['off'],
      },
      settings: {
        'mdx/code-blocks': true,
      },
    },
    {
      files: ['**/*.md'],
      processor: 'markdown/markdown',
    },
    {
      files: ['**/*.{md,mdx}/*.{js,javascript}'], // we don't lint ts at the moment
      rules: {
        indent: ['error', 2],
        quotes: ['error', 'single'],
        'no-undef': 'off',
        'no-unused-vars': 'off',
        'no-constant-condition': 'off',
        'no-useless-escape': 'off',
        'no-dupe-keys': 'off',
      },
    },
  ],
};

And here's the lint result:

  1:94   warning  `"` can be escaped with `&quot;`, `&ldquo;`, `&#34;`, `&rdquo;`  mdx/no-unescaped-entities
  1:95   warning  `>` can be escaped with `&gt;`                                   mdx/no-unescaped-entities
  1:111  warning  `>` can be escaped with `&gt;`                                   mdx/no-unescaped-entities

Your environment

  • OS:
  • Packages:
  • Env:

Steps to reproduce

Here's the pull request webpack/webpack.js.org#4326 you can use to reproduce:

  1. clone the pull request
  2. run yarn to install
  3. run yarn lint:js

Expected behaviour

No warning showed.

Actual behaviour

Warnings.

Airbnb + mdx eslint

If you need help, support, or have a question that is not a bug report or
feature request, please post it on Spectrum: https://spectrum.chat/mdx.

Questions asked here will be closed.
Hi,

Hi,

I got airbnb to work correctly on jsx files, but my project also contains mdx files.
I installed eslint-mdx and I can't figure it out how to make it work with airbnb plugin.

In eslintrc file, I added mdx lint to extends:

"extends": [
    "airbnb",
    "plugin:mdx/recommended"
  ],

When I run the eslint, I get jsx errors from MDX files, instead of MDX errors.

Are these two compatible? Is it possible to run them both?

`[email protected]` does not work with `@typescript-eslint/[email protected]`

Judging by this part of the README I assume that eslint-plugin-mdx should work with the @typescript-eslint/parser.

I use the following versions of the libraries:

  • @typescript-eslint/parser – 4.15.2.
  • eslint – 7.21.0.
  • eslint-plugin-mdx – 1.9.0.
  • eslint-plugin-react – 7.22.0. (Without this plugin I'm getting error Definition for rule 'react/jsx-no-undef' was not found).

With this config:

module.exports = {
  parser: "@typescript-eslint/parser",
  extends: ["plugin:react/recommended", "plugin:mdx/recommended"],
  settings: {
    react: {
      version: "detect",
    },
  },
};

Then I run console command for one file:

yarn eslint 'path-to-file.mdx'

I'm getting this error in the CLI:

1:2  error  Parsing error: Expression expected

But then I remove parser: "@typescript-eslint/parser", from the config it works as expected.

Error when using remark plugins using external processes

I don't know how much can be done about this, but using remark plugins that use external processes (like remark-lint-no-dead-urls or remark-preset-github) throws the following error:

$ npx eslint README.md
Error: `processSync` finished async. Use `process` instead
Occurred while linting /home/cdfa/Projects/react-turn-reveal/README.md:1
at assertDone (/home/cdfa/Projects/react-turn-reveal/node_modules/.registry.npmjs.org/unified/8.4.0/node_modules/unified/index.js:459:11)
at Function.processSync (/home/cdfa/Projects/react-turn-reveal/node_modules/.registry.npmjs.org/unified/8.4.0/node_modules/unified/index.js:391:5)
at Program (/home/cdfa/Projects/react-turn-reveal/node_modules/.registry.npmjs.org/eslint-plugin-mdx/[email protected][email protected]/node_modules/eslint-plugin-mdx/lib/es/rules/remark.js:35:44)
at listeners.(anonymous function).forEach.listener (/home/cdfa/Projects/react-turn-reveal/node_modules/.registry.npmjs.org/eslint/6.4.0/node_modules/eslint/lib/linter/safe-emitter.js:45:58)
at Array.forEach (<anonymous>)
at Object.emit (/home/cdfa/Projects/react-turn-reveal/node_modules/.registry.npmjs.org/eslint/6.4.0/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (/home/cdfa/Projects/react-turn-reveal/node_modules/.registry.npmjs.org/eslint/6.4.0/node_modules/eslint/lib/linter/node-event-generator.js:253:26)
at NodeEventGenerator.applySelectors (/home/cdfa/Projects/react-turn-reveal/node_modules/.registry.npmjs.org/eslint/6.4.0/node_modules/eslint/lib/linter/node-event-generator.js:282:22)
at NodeEventGenerator.enterNode (/home/cdfa/Projects/react-turn-reveal/node_modules/.registry.npmjs.org/eslint/6.4.0/node_modules/eslint/lib/linter/node-event-generator.js:296:14)
at CodePathAnalyzer.enterNode (/home/cdfa/Projects/react-turn-reveal/node_modules/.registry.npmjs.org/eslint/6.4.0/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:646:23)

Parsing Errors: Unterminated JSX contents when using details element

Subject of the issue

In VSCode, when using a details element I get the following error: "Parsing Errors: Unterminated JSX contents".

image

I am pretty sure this is because of this plugin since it goes away if I remove the plugin from my ESLint config (bug then I have other errors ;)).

Here's my ESLint config:

module.exports = {
    overrides: [
        {
            globals: {
                "props": true
            },
            files: ["*.mdx"],
            extends: ["plugin:mdx/recommended"],
            rules: {
                "semi": "off",
                "react/jsx-tag-spacing": "off",
                "max-len": "off",
                "react-hooks/rules-of-hooks": "off"
            }
        }
    ]
};

All the tags are closed. I try to paste the code but it doesn't format well becaise it contains markdown.

The file is available here: https://github.com/gsoft-inc/sg-orbit/blob/master/packages/react-components/src/button/stories/custom-color-hover.mdx

Thank you for your help,

Patrick

Your environment

  • OS:
    Windows 10
  • Packages:
    "eslint": "7.1.0",
    "eslint-plugin-mdx": "1.7.0"
  • Env:
    node v13.11.0
    yarn v1.22.4

Steps to reproduce

Tell us how to reproduce this issue. Please provide a working and simplified example.

🎉 BONUS POINTS for creating a minimal reproduction and uploading it to GitHub. This will get you the fastest support. 🎉

Expected behaviour

No error when using <details><summary>

Actual behaviour

What happens instead?

A Parsing Error

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.