4 Star 11 Fork 0

Gitee 极速下载 / highlight.js

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/isagalaev/highlight.js
克隆/下载
.eslintrc.js 2.96 KB
一键复制 编辑 原始数据 按行查看 历史
module.exports = {
env: {
browser: true,
es6: true,
node: true
},
extends: [
"eslint:recommended",
"standard"
],
parserOptions: {
ecmaVersion: 2015,
sourceType: "module"
},
plugins: [
"@typescript-eslint"
],
rules: {
"no-var": "warn",
"init-declarations": ["error", "always"],
"array-callback-return": "error",
"block-scoped-var": "error",
"no-multiple-empty-lines": ["error", { max: 2 }],
// we like our semi-colons
semi: ["error", "always"],
// our codebase doesn't do this at all, so disabled for now
"space-before-function-paren": ["error", "never"],
// for now ignore diff between types of quoting
quotes: "off",
// this is the style we are already using
"operator-linebreak": ["error", "before", {
overrides: {
"=": "after"
}
}],
// sometimes we declare variables with extra spacing
indent: ["error", 2, { VariableDeclarator: 2 }],
// seems like a good idea not to use explicit undefined
"no-undefined": "error",
// ensure import specifier contains file extension
"import/extensions": ["error", "always"]
},
overrides: [
{
files: ["types/*.ts", "src/*.ts"],
parser: '@typescript-eslint/parser',
rules: {
"import/no-duplicates": "off",
"import/extensions": "off"
}
},
{
files: ["src/**/*.js"],
rules: {
// make sure there is no Node.js specific API slipping into the source files
"import/no-nodejs-modules": "error",
"import/no-commonjs": "error"
}
},
{
files: ["src/languages/*.js"],
rules: {
"no-unused-expressions": "off",
// languages are all over the map and we don't want to
// do a mass edit so turn off the most egregious rule violations
// indent: "off",
camelcase: "off",
"no-control-regex": "off",
"no-useless-escape": "off",
"comma-dangle": "off",
"array-bracket-spacing": ["error", "always"
// {
// objectsInArrays: true
// }
],
// "object-curly-spacing": "warn",
// "key-spacing": "off",
// "array-bracket-spacing": ["warn"],
"array-bracket-newline": ["warn", {
multiline: true,
minItems: 2
}],
"array-element-newline": "warn",
"object-curly-newline": [1, {
minProperties: 2
}],
"object-property-newline": [2,
{ allowAllPropertiesOnSameLine: false }
]
}
},
{
files: ["demo/**/*.js"],
globals: {
hljs: "readonly"
}
},
{
files: ["test/**/*.js"],
globals: {
should: "readonly"
},
env: {
mocha: true
},
parserOptions: {
ecmaVersion: 2018
}
},
{
files: ["tools/**/*.js"],
parserOptions: {
ecmaVersion: 2020
},
rules: {
camelcase: "off"
}
}
]
};
JavaScript
1
https://gitee.com/mirrors/highlight_js.git
git@gitee.com:mirrors/highlight_js.git
mirrors
highlight_js
highlight.js
main

搜索帮助