-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot read properties of undefined (reading 'type') #3159
Comments
Thanks - is there a stack trace? It would help to know which rule is crashing. |
sorry, here is :
|
rules: {
languageOptions: {
parser,
ecmaVersion: 'latest',
},
plugins: {
import: importPlugin,
},
files: ['**/*.{js,jsx,ts,tsx,mjs,cjs}'],
// ignores: ['*/node_modules/**/*'],
rules: {
'unicode-bom': ['error', 'never'],
eqeqeq: ['warn', 'always'], //
'no-console': ['warn', { allow: ['warn', 'error'] }],
'prefer-const': [
'error',
{
destructuring: 'any',
ignoreReadBeforeAssign: false,
},
],
'no-useless-computed-key': 'error',
'object-shorthand': 'error',
'prefer-template': 'error',
'import/newline-after-import': ['warn'],
'import/no-empty-named-blocks': ['warn'],
'import/no-duplicates': ['warn', { 'prefer-inline': true }],
'import/no-useless-path-segments': [
'error',
{
noUselessIndex: true,
},
],
'import/order': [
// https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/order.md
'warn',
{
groups: ['builtin', 'external', 'internal', ['parent', 'index', 'sibling'], 'object'],
pathGroups: [
{
pattern: '@rife/**',
group: 'external',
position: 'after',
},
{
pattern: '@/**',
group: 'internal',
position: 'after',
},
{
pattern: 'src/**',
group: 'internal',
position: 'after',
},
// https://github.com/import-js/eslint-plugin-import/issues/1239#issuecomment-598064339
{
pattern: '**/*.+(css|sass|less|scss|pcss|styl)',
patternOptions: { dot: true, nocomment: true },
group: 'unknown',
position: 'after',
},
{
pattern: '{.,..}/**/*.+(css|sass|less|scss|pcss|styl)',
patternOptions: { dot: true, nocomment: true },
group: 'unknown',
position: 'after',
},
{
pattern: '**/*.+(svg|png|gif|jpg|jpeg|webp|bmp|ico)',
patternOptions: { dot: true, nocomment: true },
group: 'unknown',
position: 'after',
},
{
pattern: '{.,..}/**/*.+(svg|png|gif|jpg|jpeg|webp|bmp|ico)',
patternOptions: { dot: true, nocomment: true },
group: 'unknown',
position: 'after',
},
],
pathGroupsExcludedImportTypes: [],
distinctGroup: false,
'newlines-between': 'always',
named: {
enabled: true,
types: 'types-first',
},
alphabetize: {
order: 'asc',
},
},
],
},
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
lint code as follow:
crash:
The text was updated successfully, but these errors were encountered: