/* * Copyright (C) Sapphirecode - All Rights Reserved * This file is part of SCode-Eslint-Config which is released under BSD-3-Clause. * See file 'LICENSE' for full license details. * Created by Timo Hocker , March 2020 */ module.exports = { globals: {}, parser: 'babel-eslint', extends: [ '@scode' ], plugins: [ 'eslint-plugin-import' ], parserOptions: { sourceType: 'module' }, settings: { 'import/extensions': ['.js', '.jsx', '.ts', '.tsx', '.mjs'], 'import/resolver': { node: { extensions: ['.js', '.jsx', '.ts', '.tsx', '.mjs'] } } }, rules: { // deactivate commonjs rules 'node/no-unsupported-features/es-syntax': 'off', // import 'import/no-unresolved': 'error', 'import/named': 'error', 'import/default': 'error', 'import/namespace': 'error', 'import/no-absolute-path': 'error', 'import/no-dynamic-require': 'warn', 'import/no-webpack-loader-syntax': 'error', 'import/no-self-import': 'error', 'import/no-cycle': 'error', 'import/no-useless-path-segments': 'error', 'import/no-unused-modules': 'error', 'import/export': 'error', 'import/no-named-as-default': 'error', 'import/no-named-as-default-member': 'error', 'import/no-deprecated': 'error', 'import/no-extraneous-dependencies': 'error', 'import/no-mutable-exports': 'error', 'import/unambiguous': 'error', 'import/no-commonjs': 'error', 'import/no-amd': 'error', 'import/first': 'error', 'import/exports-last': 'error', 'import/no-duplicates': 'error', 'import/no-namespace': 'error', 'import/extensions': [ 'error', 'ignorePackages', { js: 'never', ts: 'never' } ], 'import/order': 'error', 'import/newline-after-import': 'error', 'import/prefer-default-export': 'off', 'import/no-unassigned-import': 'error', 'import/no-named-default': 'error' } }