1 Star 0 Fork 86

夕林 / Hippy

forked from 腾讯开源 / Hippy 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
.eslintrc.js 3.04 KB
一键复制 编辑 原始数据 按行查看 历史
ZoomChan 提交于 2021-09-29 11:11 . build(react,vue): rm unicode plugin
module.exports = {
parser: 'vue-eslint-parser',
parserOptions: {
parser: '@typescript-eslint/parser',
ecmaFeatures: {
jsx: true,
legacyDecorators: true,
experimentalObjectRestSpread: true,
},
ecmaVersion: 2018,
sourceType: 'module',
},
extends: [
'eslint-config-tencent',
'plugin:react/recommended',
'plugin:vue/recommended',
'plugin:import/recommended',
'plugin:import/typescript',
],
plugins: [
'vue',
'@typescript-eslint',
'jsx-a11y',
],
overrides: [
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
// Allow interface export
'no-undef': 'off',
// Disable props checking
'react/prop-types': 'off',
// Force use 2 space for indent
'@typescript-eslint/indent': ['error', 2],
// Note you must disable the base rule as it can report incorrect errors
'no-unused-vars': 'off',
},
},
],
env: {
browser: true,
node: true,
es6: true,
},
globals: {
__PLATFORM__: 'readonly',
__GLOBAL__: 'readonly',
Hippy: 'readonly',
WebSocket: 'readonly',
},
rules: {
semi: ['error', 'always'],
// Allow more than one component per file
'vue/one-component-per-file': 'off',
// Allow no default value
'vue/require-default-prop': 'off',
// Allow no prop type
'vue/require-prop-types': 'off',
// Allow event name not kebab-case
'vue/custom-event-name-casing': 'off',
'import/no-unresolved': 'off',
// Allow import name different with file name
'import/no-named-as-default': 'off',
// Allow import cycle
'import/no-cycle': 'off',
// Disable prop-types
'react/prop-types': 'off',
// Disable deprecated
'react/no-deprecated': 'off',
// Turn of extensions checking temporary
'import/extensions': 'off',
// https://github.com/benmosher/eslint-plugin-import/tree/master/docs/rules/namespace.md#allowcomputed
'import/namespace': [
'error',
{
allowComputed: true,
},
],
// Allow import from devDependencies
'import/no-extraneous-dependencies': [
'error',
{
devDependencies: [
'scripts/*.js',
// FIXME: seems not working
'packages/**/types/*.d.ts',
'packages/**/__tests__/*.test.js',
'examples/**/scripts/*.js',
],
},
],
// Allow tsx as the jsx file
'react/jsx-filename-extension': [
'error',
{
extensions: ['.tsx', '.jsx'],
},
],
// Auto range order of imported module
'import/order': ['error'],
// Allow global underscore in dangle
'no-underscore-dangle': [
'warn',
{
allow: [
'__ISHIPPY__',
'__GLOBAL__',
'__HIPPYNATIVEGLOBAL__',
'__instanceId__',
'_reactInternalFiber',
'_reactInternals',
],
},
],
},
settings: {
react: {
version: 'detect', // React version. "detect" automatically picks the version you have installed.
},
},
};
JavaScript
1
https://gitee.com/gaoluona/Hippy.git
git@gitee.com:gaoluona/Hippy.git
gaoluona
Hippy
Hippy
master

搜索帮助