新增: - backend/venv/ - Python 虚拟环境 - backend/start.sh - 启动脚本(使用虚拟环境) - backend/requirements.txt - 依赖列表 - .gitignore - 忽略虚拟环境和缓存文件 说明: - 每个项目使用独立虚拟环境 - 避免依赖冲突 - 启动脚本自动创建和激活虚拟环境
1.4 KiB
1.4 KiB
import/no-named-as-default
⚠️ This rule warns in the following configs: ☑️ recommended, 🚸 warnings.
Reports use of an exported name as the locally imported name of a default export.
Rationale: using an exported name as the name of the default export is likely...
- misleading: others familiar with
foo.jsprobably expect the name to befoo - a mistake: only needed to import
barand forgot the brackets (the case that is prompting this)
Rule Details
Given:
// foo.js
export default 'foo';
export const bar = 'baz';
...this would be valid:
import foo from './foo.js';
...and this would be reported:
// message: Using exported name 'bar' as identifier for default export.
import bar from './foo.js';
For post-ES2015 export extensions, this also prevents exporting the default from a referenced module as a name within that module, for the same reasons:
// valid:
export foo from './foo.js';
// message: Using exported name 'bar' as identifier for default export.
export bar from './foo.js';
Further Reading
- ECMAScript Proposal: export ns from
- ECMAScript Proposal: export default from