UNPKG

nvenv

Version:

Python venv-like Node.js environment manager - project-local Node.js installation without global environment pollution

70 lines (67 loc) 2.24 kB
import stylistic from '@stylistic/eslint-plugin'; export default [ { ignores: [ 'node_modules/**', 'test/.test-*/**', 'test/**/.test-*/**', '**/coverage/**' ] }, { files: ['**/*.js'], plugins: { '@stylistic': stylistic }, languageOptions: { ecmaVersion: 2022, sourceType: 'commonjs', globals: { console: 'readonly', process: 'readonly', require: 'readonly', module: 'readonly', __dirname: 'readonly', __filename: 'readonly', exports: 'readonly', Buffer: 'readonly' } }, rules: { // Core ESLint rules 'no-unused-vars': ['error', { argsIgnorePattern: '^_', varsIgnorePattern: '^_' }], 'no-undef': 'error', 'no-console': 'off', 'prefer-const': 'error', 'no-var': 'error', 'eqeqeq': ['error', 'always', { null: 'ignore' }], 'curly': ['error', 'all'], 'no-throw-literal': 'error', 'prefer-promise-reject-errors': 'error', // Stylistic rules '@stylistic/indent': ['error', 2, { SwitchCase: 1 }], '@stylistic/quotes': ['error', 'single', { avoidEscape: true }], '@stylistic/semi': ['error', 'always'], '@stylistic/comma-dangle': ['error', 'never'], '@stylistic/comma-spacing': ['error', { before: false, after: true }], '@stylistic/keyword-spacing': ['error', { before: true, after: true }], '@stylistic/space-before-blocks': ['error', 'always'], '@stylistic/space-before-function-paren': ['error', { anonymous: 'always', named: 'never', asyncArrow: 'always' }], '@stylistic/object-curly-spacing': ['error', 'always'], '@stylistic/array-bracket-spacing': ['error', 'never'], '@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: true }], '@stylistic/no-trailing-spaces': 'error', '@stylistic/eol-last': ['error', 'always'], '@stylistic/no-multiple-empty-lines': ['error', { max: 1, maxEOF: 0, maxBOF: 0 }], '@stylistic/arrow-spacing': ['error', { before: true, after: true }], '@stylistic/key-spacing': ['error', { beforeColon: false, afterColon: true }] } } ];