<commit_before>env:
  browser: true
  node: true
  es6: true
  jest: true
  worker: true
  serviceworker: true

installedESLint: true

parserOptions:
  ecmaFeatures:
    experimentalObjectRestSpread: true
    generators: true
    jsx: true
  sourceType: module

plugins:
  - import
  - react
  - flowtype
  - jsx-a11y

extends:
  - eslint:recommended
  - plugin:react/recommended
  - plugin:import/errors
  - plugin:import/warnings

rules:
  #######################################################################################
  # Basics
  #######################################################################################

  indent:
    - error
    - 2
    - SwitchCase: 1
      VariableDeclarator: 0
  linebreak-style:
    - error
    - unix
  quotes:
    - error
    - double
    - avoidEscape: true
      allowTemplateLiterals: true
  semi:
    - error
    - never
  no-console:
    - off
  no-extra-parens:
    - off
  brace-style:
    - off


  #######################################################################################
  # Code Quality
  #######################################################################################

  array-callback-return:
    - error
  block-scoped-var:
    - off

  # Keeping complexity down. The default of 20 is far to high in my opinion.
  complexity:
    - error
    - 5
  consistent-return:
    - error

  # Allo using curly braces or not (e.g. for simple if-statements)
  curly:
    - off

  default-case:
    - error
  dot-location:
    - error
    - property
  dot-notation:
    - error
    - allowKeywords: true

  # Smart option allows simple equal for null-comparison which is good
  eqeqeq:
    - error
    - smart
  no-alert:
    - error

  # Was mainly relevant while people extended Object.prototype.xxx
  guard-for-in:
    - off

  # Match ES5 strict
  no-caller:
    - error

  # Hard to read code must be forbidden
  no-div-regex:
    - error

  # Makes codes easier to read
  no-else-return:
    - error

  no-empty-function:
    - error
  no-empty-pattern:
    - error

  # This is just stupid
  no-eq-null:
    - off

  no-eval:
    - error
  no-extend-native:
    - error
  no-fallthrough:
    - error
  no-floating-decimal:
    - error

  # I like some of these, but numbers are to awkward for me.
  no-implicit-coercion:
    - error
    - boolean: true
      string: true
      number: false

  # Does not make sense with ES6 modules
  no-implicit-globals:
    - off

  no-implied-eval:
    - error
  no-invalid-this:
    - error
  no-iterator:
    - error
  no-lone-blocks:
    - error

  # Good style
  no-magic-numbers:
    - error
    - ignoreArrayIndexes: true
      ignore: [ -1, 0, 1, 2, 10, 16, 100, 1000 ]

  no-mixed-operators:
    - warn
    - groups:
      - ['&', '|', '^', '~', '<<', '>>', '>>>']
      - ['==', '!=', '===', '!==', '>', '>=', '<', '<=']
      - ['&&', '||']
      - ['in', 'instanceof']
      allowSamePrecedence: false

  # Useless formatting with high maintenance
  no-multi-spaces:
    - error

  no-multi-str:
    - error
  no-native-reassign:
    - error
  no-new-func:
    - error
  no-new-wrappers:
    - error
  no-octal:
    - error
  no-octal-escape:
    - error

  valid-typeof: error

  # Prevent side effects to arguments objects, but also makes code sometimes more complexer
  # when you have some logic in place to deal with different argument sets
  no-param-reassign:
    - off

  # For maintainability of NodeJS code
  no-process-env:
    - error

  # Deprecated feature
  no-proto:
    - error

  # Disabled. Therefor they are variables, right?
  no-redeclare:
    - off

  # Readability wins
  no-return-assign:
    - error

  no-script-url:
    - error
  no-self-assign:
    - error
  no-self-compare:
    - error

  # Omit magic syntax... Readability for all wins<commit_msg>Allowing process.env access. Don't agree with the point forbidding it.<commit_after>env:
  browser: true
  node: true
  es6: true
  jest: true
  worker: true
  serviceworker: true

installedESLint: true

parserOptions:
  ecmaFeatures:
    experimentalObjectRestSpread: true
    generators: true
    jsx: true
  sourceType: module

plugins:
  - import
  - react
  - flowtype
  - jsx-a11y

extends:
  - eslint:recommended
  - plugin:react/recommended
  - plugin:import/errors
  - plugin:import/warnings

rules:
  #######################################################################################
  # Basics
  #######################################################################################

  indent:
    - error
    - 2
    - SwitchCase: 1
      VariableDeclarator: 0
  linebreak-style:
    - error
    - unix
  quotes:
    - error
    - double
    - avoidEscape: true
      allowTemplateLiterals: true
  semi:
    - error
    - never
  no-console:
    - off
  no-extra-parens:
    - off
  brace-style:
    - off


  #######################################################################################
  # Code Quality
  #######################################################################################

  array-callback-return:
    - error
  block-scoped-var:
    - off

  # Keeping complexity down. The default of 20 is far to high in my opinion.
  complexity:
    - error
    - 5
  consistent-return:
    - error

  # Allo using curly braces or not (e.g. for simple if-statements)
  curly:
    - off

  default-case:
    - error
  dot-location:
    - error
    - property
  dot-notation:
    - error
    - allowKeywords: true

  # Smart option allows simple equal for null-comparison which is good
  eqeqeq:
    - error
    - smart
  no-alert:
    - error

  # Was mainly relevant while people extended Object.prototype.xxx
  guard-for-in:
    - off

  # Match ES5 strict
  no-caller:
    - error

  # Hard to read code must be forbidden
  no-div-regex:
    - error

  # Makes codes easier to read
  no-else-return:
    - error

  no-empty-function:
    - error
  no-empty-pattern:
    - error

  # This is just stupid
  no-eq-null:
    - off

  no-eval:
    - error
  no-extend-native:
    - error
  no-fallthrough:
    - error
  no-floating-decimal:
    - error

  # I like some of these, but numbers are to awkward for me.
  no-implicit-coercion:
    - error
    - boolean: true
      string: true
      number: false

  # Does not make sense with ES6 modules
  no-implicit-globals:
    - off

  no-implied-eval:
    - error
  no-invalid-this:
    - error
  no-iterator:
    - error
  no-lone-blocks:
    - error

  # Good style
  no-magic-numbers:
    - error
    - ignoreArrayIndexes: true
      ignore: [ -1, 0, 1, 2, 10, 16, 100, 1000 ]

  no-mixed-operators:
    - warn
    - groups:
      - ['&', '|', '^', '~', '<<', '>>', '>>>']
      - ['==', '!=', '===', '!==', '>', '>=', '<', '<=']
      - ['&&', '||']
      - ['in', 'instanceof']
      allowSamePrecedence: false

  # Useless formatting with high maintenance
  no-multi-spaces:
    - error

  no-multi-str:
    - error
  no-native-reassign:
    - error
  no-new-func:
    - error
  no-new-wrappers:
    - error
  no-octal:
    - error
  no-octal-escape:
    - error

  valid-typeof: error

  # Prevent side effects to arguments objects, but also makes code sometimes more complexer
  # when you have some logic in place to deal with different argument sets
  no-param-reassign:
    - off

  # Access NodeJS environment. Used mostly for code variations e.g. `NODE_ENV`
  no-process-env:
    - off

  # Deprecated feature
  no-proto:
    - error

  # Disabled. Therefor they are variables, right?
  no-redeclare:
    - off

  # Readability wins
  no-return-assign:
    - error

  no-script-url:
    - error
  no-self-assign:
    - error
  no-self-compare:
    - error

  # Omit magic syntax... Readability for all wins
{'fraction_non_alphanumeric': 0.19139562005960867, 'fraction_numerical': 0.006738369832836595, 'mean_word_length': 2.3138686131386863, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5164277', 'n_tokens_mistral': 2604, 'n_tokens_neox': 2461, 'n_words': 645}