# no-module-extensions > Disallow file extensions in AMD dependency paths. ❕ **Suggestion** • ✅ **Recommended** • ❌ **Fixable** ## Details AMD module IDs are logical names, not file paths. Including file extensions makes modules brittle to refactoring and breaks loader plugins that rely on the extension-free ID convention. ### ✅ Correct ```js define(['foo'], (foo) => {}); ``` ```js // 'amd/no-module-extensions': ['warn', { blacklist: ['.ts'] }] // or // 'amd/no-module-extensions': ['warn', { whitelist: ['.js'] }] define(['foo.js'], (foo) => {}); ``` ### ❌ Incorrect ```js // Default blacklist (all extensions) define(['foo.js', 'bar/baz.ts'], (foo, baz) => {}); ``` ```js // 'amd/no-module-extensions': ['warn', { blacklist: ['.ts'] }] define(['foo.ts'], (foo) => {}); ``` ```js // 'amd/no-module-extensions': ['warn', { whitelist: ['.js'] }] define(['foo.ts'], (foo) => {}); ``` ## Options | Option | Type | Default | Description | |:--|:--|:--|:--| | `blacklist` | `string[]` | All extensions | Extensions disallowed in dependency paths. If set, all other extensions are allowed. | | `whitelist` | `string[]` | | Extensions allowed in dependency paths. If set, all other extensions are disallowed and any `blacklist` is ignored. | ## Introduced 1.0.0