'no-dupe-args': 'error',
'no-dupe-keys': 'error',
'no-duplicate-case': 'error',
- 'no-empty': 'error',
+ // Disabled for YUI rollups, enabled by grunt for AMD: 'no-empty': 'error',
'no-empty-character-class': 'error',
'no-ex-assign': 'error',
'no-extra-boolean-cast': 'error',
'no-self-assign': 'error',
'no-self-compare': 'error',
'no-unmodified-loop-condition': 'error',
- 'no-unused-expressions': 'error',
+ // Disabled for YUI rollups, enabled by grunt for AMD: 'no-unused-expressions': 'error',
'no-unused-labels': 'error',
//DEFINE POLICY: 'no-useless-call': 'error',
'no-useless-escape': 'warn',
// === Variables ===
'no-delete-var': 'error',
- 'no-undef': 'error',
+ // Disabled for YUI rollups, enabled by grunt for AMD: 'no-undef': 'off',
//DEFINE POLICY: 'no-undef-init': 'error',
- 'no-unused-vars': 'error',
+ // Disabled for YUI rollups, enabled by grunt for AMD: 'no-unused-vars': 'error',
// === Stylistic Issues ===
'array-bracket-spacing': 'warn',
// * It will complain about ignored files (https://github.com/sindresorhus/grunt-eslint/issues/119)
// * It's better experience to use editor integrations or eslint natively
options: { quiet: !grunt.option('show-lint-warnings') },
- // Check AMD files with standard config
- amd: { src: amdSrc },
- // Some rules disabled for YUI config, because we don't do rollup magic, so its able to be accurate
- // about undefined items.
+ // Check AMD files. We add some stricter rules which we can't apply to the default configuration due
+ // to YUI rollups.
+ amd: {
+ src: amdSrc,
+ options: { rules: {'no-undef': 'error', 'no-unused-vars': 'error', 'no-empty': 'error', 'no-unused-expressions': 'error'} }
+ },
+ // Check YUI module source files.
yui: {
- src: ['**/yui/src/**/*.js'],
- options: {globals: ['Y', 'YUI'], rules: {'no-undef': 'off', 'no-unused-vars': 'off', 'no-empty': 'off'} }
+ src: ['**/yui/src/**/*.js']
}
},
uglify: {