2018-06-29 02:42:23 +03:00
|
|
|
{
|
|
|
|
"extends": "airbnb",
|
|
|
|
"env": {
|
|
|
|
"webextensions": true,
|
|
|
|
"browser": true
|
|
|
|
},
|
2018-07-07 04:30:08 +03:00
|
|
|
"plugins": ["react"],
|
2018-07-16 22:56:53 +03:00
|
|
|
"parser": "babel-eslint",
|
2018-06-29 02:42:23 +03:00
|
|
|
"rules": {
|
|
|
|
"object-curly-newline": ["error", {"consistent": true}],
|
|
|
|
"object-curly-spacing": ["off"],
|
|
|
|
"no-plusplus": ["off"],
|
|
|
|
"prefer-destructuring": ["off"],
|
2018-07-06 19:37:23 +03:00
|
|
|
"no-restricted-syntax": ["off"],
|
2018-07-11 22:33:08 +03:00
|
|
|
"no-use-before-define": ["error", {"functions": false}],
|
2018-08-03 01:33:26 +03:00
|
|
|
"no-prototype-builtins": ["off"],
|
#36: Break out fathom_ruleset.js into two separate scripts.
The first script, 'ruleset_factory.js', exports a class to create a ruleset based on a set of coefficients; instances of this class are used in production (via 'fathom_extraction.js') and for Fathom training (via 'trainees.js').
2. The second script, 'trainees.js', is used exclusively for training using the FathomFox web extension and does not ship with the commerce web extension.
Additional changes and notes:
* I chose not to make use of the 'autobind' decorator in 'ruleset_factory.js', since it is also used in the training add-on, where devDeps like 'babel-core' and 'babel-plugin-transform-decorators-legacy' do not exist.
* I also turned off an eslint rule that requires class methods to use 'this', since some methods in RulesetFactory don't require it, and it would be tedious and confusing to call some methods on the class instance and others on the class itself.
* The new training script ('trainees.js') has three elements in the map it exports, one for each product feature ('image', 'title', 'price'). This allows us to select which feature to train from a dropdown menu on FathomFox's trainer page.
* Currently, for training, four files must be copied over into the 'fathom-trainees' add-on src directory:
* config.js
* fathom_default_coefficients.json
* ruleset_factory.js
* trainees.js (overwritting the existing file)
* In a separate commit, I will put all the Fathom extraction files into an 'extraction' (or similar) subfolder.
2018-08-19 06:35:30 +03:00
|
|
|
"class-methods-use-this": ["off"],
|
2018-08-28 01:00:36 +03:00
|
|
|
"no-continue": ["off"],
|
2018-07-16 22:56:53 +03:00
|
|
|
|
2018-08-23 11:47:20 +03:00
|
|
|
"import/no-duplicates": ["off"],
|
2018-08-28 01:00:36 +03:00
|
|
|
"import/prefer-default-export": ["off"],
|
2018-08-23 11:47:20 +03:00
|
|
|
|
2018-07-11 22:33:08 +03:00
|
|
|
"react/jsx-one-expression-per-line": ["off"],
|
2018-07-16 22:56:53 +03:00
|
|
|
"react/prefer-stateless-function": ["off"],
|
|
|
|
"react/no-multi-comp": ["off"],
|
|
|
|
"react/destructuring-assignment": ["off"],
|
|
|
|
|
|
|
|
"jsx-a11y/click-events-have-key-events": ["off"],
|
|
|
|
"jsx-a11y/no-static-element-interactions": ["off"]
|
2018-07-14 11:37:26 +03:00
|
|
|
},
|
|
|
|
"settings": {
|
2018-10-21 04:42:30 +03:00
|
|
|
"import/resolver": {
|
|
|
|
"webpack": {
|
2018-10-22 23:36:40 +03:00
|
|
|
"config": "webpack/dev.config.js"
|
2018-10-21 04:42:30 +03:00
|
|
|
}
|
|
|
|
}
|
2018-06-29 02:42:23 +03:00
|
|
|
}
|
|
|
|
}
|