<commit_before>module.exports = {
	extends: ['eslint-config-airbnb', 'prettier', 'prettier/react'],
	parser: 'babel-eslint',
	parserOptions: {
		ecmaVersion: 7,
		sourceType: 'module',
		ecmaFeatures: {
			classes: true,
			experimentalObjectRestSpread: true,
			impliedStrict: true,
			jsx: true,
			modules: true,
		},
	},
	plugins: [
		'filenames',
		'json',
		'prefer-object-spread',
		'@salesforce/slds-react',
	],
	env: {
		browser: true,
	},
	settings: {
		react: {
			pragma: 'React',
			version: 'detect',
		},
	},
	overrides: [
		{
			// Storybook and site examples
			files: [
				'**/__examples__/**/*.{js,jsx}',
				'**/__docs__/**/*.{js,jsx}',
				'**/site-stories.js',
			],
			rules: {
				// devDependencies are used
				'import/no-extraneous-dependencies': 'off',
				// console is used in examples
				'no-console': 'off',
				// TODO: This should be removed.
				'no-unused-vars': 'off',
				'react/no-access-state-in-setstate': 'off',
			},
		},
		{
			// Utility scripts
			files: ['./*.js', 'preset/*.js', 'scripts/*.js', '**/site-stories.js'],
			rules: {
				// devDependencies are used
				'import/no-extraneous-dependencies': 'off',
				// Utility scripts use many types of loaders
				'import/no-webpack-loader-syntax': 'off',
				// console is used in scripts
				'no-console': 'off',
			},
		},
		{
			// Test files
			files: ['**/__tests__/**/*.{js,jsx}', 'tests/*.{js,jsx}'],
			env: {
				browser: true,
				jest: true,
				mocha: true,
			},
			globals: {
				chai: true,
				jest: true,
				sinon: true,
			},
			rules: {
				'func-names': 'off',
				// devDependencies are used
				'import/no-extraneous-dependencies': 'off',
				// console is used in tests
				'no-console': 'off',
				// TODO: This should be removed.
				'no-unused-expressions': 'off',
				// TODO: This should be removed.
				'prefer-arrow-callback': 'off',
				// TODO: This should be removed.
				'react/display-name': 'off',
				'react/no-access-state-in-setstate': 'off',
			},
		},
		{
			// ESLint Plugin
			files: ['eslint-plugin/**/*.js'],
			rules: {
				'import/no-extraneous-dependencies': 'off',
				'@salesforce/slds-react/no-double-dash-modifier': 'off',
			},
		},
	],
	// Please review Prettier settings for style linting
	rules: {
		'linebreak-style': [
			2,
			process.env.OS && process.env.OS.match(/Windows/) ? 'windows' : 'unix',
		],
		// Creates consistent filename case: "kabob case"
		'filenames/match-regex': [2, '^[a-z\\-\\.]+$', true],
		// All imported files are JSX or JS
		'import/extensions': 'off',
		// `~` is used by examples for "root" npm package in documentation site
		'import/no-unresolved': [2, { ignore: ['^[~]'] }],
		'no-multi-spaces': [
			2,
			{
				// allows "column spacing." Following key names are Abstract Syntax Tree types
				exceptions: {
					VariableDeclarator: true,
					Property: true,
					ImportDeclaration: true,
					AssignmentExpression: true,
					JSXAttribute: true,
				},
			},
		],
		// javascript:void(0) is present in SLDS markup
		'no-script-url': 'off',
		// _ is not really private.
		'no-underscore-dangle': ['error', { allowAfterThis: true }],
		//
		'prefer-object-spread/prefer-object-spread': [2, 'always'],

		'max-lines': [
			'error',
			{ max: 500, skipBlankLines: true, skipComments: true },
		],

		// Can't be used because it doesn't currently recognize props used in functions
		'react/no-unused-prop-types': 'off',

		//
		// THE FOLLOWING RULES NEED REVIEW IN THE FUTURE (and possibly removed)
		//
		// When someone is ready to tackle these issues, feel free to tighten
		// the following rules. Do not push a change that causes lint errors/warnings
		// to start appearing. All lint warnings errors should be meaningful, and
		// therefore, there should never intentionally be any.

		// We are open to changing this to always use a trailing comma,
		// in order to make re-sorting easier
		'comma-dangle': [2, 'only-multiline'],

		'import/no-useless-path-segments': 'off',
		// Should be removed in the future. `event` is the main global used now.<commit_msg>Eslint: Force use of React.fragment over <><commit_after>module.exports = {
	extends: ['eslint-config-airbnb', 'prettier', 'prettier/react'],
	parser: 'babel-eslint',
	parserOptions: {
		ecmaVersion: 7,
		sourceType: 'module',
		ecmaFeatures: {
			classes: true,
			experimentalObjectRestSpread: true,
			impliedStrict: true,
			jsx: true,
			modules: true,
		},
	},
	plugins: [
		'filenames',
		'json',
		'prefer-object-spread',
		'@salesforce/slds-react',
	],
	env: {
		browser: true,
	},
	settings: {
		react: {
			pragma: 'React',
			version: 'detect',
		},
	},
	overrides: [
		{
			// Storybook and site examples
			files: [
				'**/__examples__/**/*.{js,jsx}',
				'**/__docs__/**/*.{js,jsx}',
				'**/site-stories.js',
			],
			rules: {
				// devDependencies are used
				'import/no-extraneous-dependencies': 'off',
				// console is used in examples
				'no-console': 'off',
				// TODO: This should be removed.
				'no-unused-vars': 'off',
				'react/no-access-state-in-setstate': 'off',
			},
		},
		{
			// Utility scripts
			files: ['./*.js', 'preset/*.js', 'scripts/*.js', '**/site-stories.js'],
			rules: {
				// devDependencies are used
				'import/no-extraneous-dependencies': 'off',
				// Utility scripts use many types of loaders
				'import/no-webpack-loader-syntax': 'off',
				// console is used in scripts
				'no-console': 'off',
			},
		},
		{
			// Test files
			files: ['**/__tests__/**/*.{js,jsx}', 'tests/*.{js,jsx}'],
			env: {
				browser: true,
				jest: true,
				mocha: true,
			},
			globals: {
				chai: true,
				jest: true,
				sinon: true,
			},
			rules: {
				'func-names': 'off',
				// devDependencies are used
				'import/no-extraneous-dependencies': 'off',
				// console is used in tests
				'no-console': 'off',
				// TODO: This should be removed.
				'no-unused-expressions': 'off',
				// TODO: This should be removed.
				'prefer-arrow-callback': 'off',
				// TODO: This should be removed.
				'react/display-name': 'off',
				'react/no-access-state-in-setstate': 'off',
			},
		},
		{
			// ESLint Plugin
			files: ['eslint-plugin/**/*.js'],
			rules: {
				'import/no-extraneous-dependencies': 'off',
				'@salesforce/slds-react/no-double-dash-modifier': 'off',
			},
		},
	],
	// Please review Prettier settings for style linting
	rules: {
		'linebreak-style': [
			2,
			process.env.OS && process.env.OS.match(/Windows/) ? 'windows' : 'unix',
		],
		// Creates consistent filename case: "kabob case"
		'filenames/match-regex': [2, '^[a-z\\-\\.]+$', true],
		// All imported files are JSX or JS
		'import/extensions': 'off',
		// `~` is used by examples for "root" npm package in documentation site
		'import/no-unresolved': [2, { ignore: ['^[~]'] }],
		'no-multi-spaces': [
			2,
			{
				// allows "column spacing." Following key names are Abstract Syntax Tree types
				exceptions: {
					VariableDeclarator: true,
					Property: true,
					ImportDeclaration: true,
					AssignmentExpression: true,
					JSXAttribute: true,
				},
			},
		],
		// javascript:void(0) is present in SLDS markup
		'no-script-url': 'off',
		// _ is not really private.
		'no-underscore-dangle': ['error', { allowAfterThis: true }],
		//
		'prefer-object-spread/prefer-object-spread': [2, 'always'],
		'react/jsx-fragments': ['error', 'element'],
		'max-lines': [
			'error',
			{ max: 500, skipBlankLines: true, skipComments: true },
		],

		// Can't be used because it doesn't currently recognize props used in functions
		'react/no-unused-prop-types': 'off',

		//
		// THE FOLLOWING RULES NEED REVIEW IN THE FUTURE (and possibly removed)
		//
		// When someone is ready to tackle these issues, feel free to tighten
		// the following rules. Do not push a change that causes lint errors/warnings
		// to start appearing. All lint warnings errors should be meaningful, and
		// therefore, there should never intentionally be any.

		// We are open to changing this to always use a trailing comma,
		// in order to make re-sorting easier
		'comma-dangle': [2, 'only-multiline'],

		'import/no-useless-path-segments': 'off',
		// Should be removed in the future. `event` is the main global used now.
{'fraction_non_alphanumeric': 0.17187118809465723, 'fraction_numerical': 0.002683581361307636, 'mean_word_length': 2.79935125115848, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '1139920', 'n_tokens_mistral': 3420, 'n_tokens_neox': 2839, 'n_words': 736}