Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Enable import/no-namespace #305

Merged
merged 1 commit into from
Jun 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
- `node/prefer-promises/dns` and `node/prefer-promises/fs` These rules disallow the callback API in favor of promise API for the dns and fs modules. ([257](https://github.com/Shopify/eslint-plugin-shopify/pull/257))
- `jest/no-mocks-import` This rule disallows manually importing from `__mocks__` ([246](https://github.com/Shopify/eslint-plugin-shopify/pull/246))
- `react/state-in-constructor` Enforce state initialization to be in a class property. ([256](https://github.com/Shopify/eslint-plugin-shopify/pull/246))
- `import/no-namespace` Prevents namespace imports. ([305](https://github.com/Shopify/eslint-plugin-shopify/pull/305))

### Fixed

Expand Down
2 changes: 1 addition & 1 deletion lib/config/rules/import.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = {
// Report repeated import of the same module in multiple places
'import/no-duplicates': 'error',
// Report namespace imports
'import/no-namespace': 'off',
'import/no-namespace': 'error',
// Ensure consistent use of file extension within the import path
'import/extensions': [
'error',
Expand Down
2 changes: 1 addition & 1 deletion lib/config/rules/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.exports = {
'typescript/no-inferrable-types': ['error'],

// Disallow the use of custom TypeScript modules and namespaces
'typescript/no-namespace': 'off',
'typescript/no-namespace': 'error',

// Disallow non-null assertions using the ! postfix operator
'typescript/no-non-null-assertion': 'off',
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/typescript-no-js/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import * as path from 'path';
import path from 'path';

export default path;