# .eslintrc.js

禁用不必要的分号 (no-extra-semi)

semi (opens new window)

.eslintrc.js

rules: {
  semi: ["error", "always"]
}
1
2
3

默认选项 "always" 的 正确 代码示例:

/*eslint semi: "error"*/

var name = "ESLint";

object.method = function() {
    // ...
};
1
2
3
4
5
6
7

ex: vitex.net