commit b52074c9926b94bb9b95d5b428c935a68455e3ce Author: Timothy J. Warren Date: Tue Oct 11 20:27:20 2016 -0400 First commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..055f803 --- /dev/null +++ b/.gitignore @@ -0,0 +1,84 @@ +# Created by .ignore support plugin (hsz.mobi) +### JetBrains template +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff: +.idea/workspace.xml +.idea/tasks.xml +.idea/dictionaries +.idea/vcs.xml +.idea/jsLibraryMappings.xml + +# Sensitive or high-churn files: +.idea/dataSources.ids +.idea/dataSources.xml +.idea/dataSources.local.xml +.idea/sqlDataSources.xml +.idea/dynamic.xml +.idea/uiDesigner.xml + +# Gradle: +.idea/gradle.xml +.idea/libraries + +# Mongo Explorer plugin: +.idea/mongoSettings.xml + +## File-based project format: +*.iws + +## Plugin-specific files: + +# IntelliJ +/out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties +### Node template +# Logs +logs +*.log +npm-debug.log* + +# Runtime data +pids +*.pid +*.seed + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules +jspm_packages + +# Optional npm cache directory +.npm + +# Optional REPL history +.node_repl_history diff --git a/index.js b/index.js new file mode 100644 index 0000000..85a8b76 --- /dev/null +++ b/index.js @@ -0,0 +1,28 @@ +module.exports = { + env: { + browser: true, + node: true, + }, + parserOptions: { + ecmaVersion: 6, + ecmaFeatures: { + jsx: true, + } + }, + rules: { + 'no-cond-assign': ['error', 'except-parens'], // Don't assign in conditionals + 'no-constant-condition': ['error', { + checkLoops: false, + }], + 'no-control-regex': ['error'], // Don't match control characters (ASCII 0-31) in regex + 'no-debugger': ['error'], // Disallow use of debugger statements + 'no-dupe-args': ['error'], // No duplicate function arguments + 'no-dupe-keys': ['error'], // No duplicate keys in object literals + 'no-duplicate-case': ['error'], // No duplicate case labels in switch statements + 'no-empty-character-class': ['error'], // No empty character classes in regex + 'no-extra-boolean-cast': ['error'], // Disable unneeded boolean casts + quotes: ['warn', 'single', { + allowTemplateLiterals: true, + }], + }, +}; \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..83feff4 --- /dev/null +++ b/package.json @@ -0,0 +1,10 @@ +{ + "name": "eslint-config-pragmaticjs", + "peerDependencies": { + "eslint": ">= 3" + }, + "scripts": { + "lint": "eslint -c index.js *.js" + }, + "version": "1.0.0" +}